part of him had been aware that it was just a dream while it had been happening , yet it had been so vivid that an element of doubt had crept in , even as the train had been steaming across the sky with him on board .