The mystery of the backward-facing train is solved. Although it's not a published stop in the public timetable, this train does stop at Aomori. As we slowly made our way into Aomori station, I could see a specially-painted electric locomotive waiting on a side track. We stopped at the platform, and a few minutes later, that locomotive tied on to the "Tokyo" end of the train, the locomotive that had pulled us from Hakkodate cut off, and we pulled out of the stub end station heading for Tokyo, this time pointed the direction that the train diagram says we should be facing. It was all done very efficiently.
Despite the still-oppressive heat inside the compartment, we turned in to get some sleep, bidding farewell to Aomori for the final time.