Oh cool, it knew it was coming to you!
Animals are sooo much more capable than most people think, our shelter dog popped up in my mind totally at random for weeks at the start, in the middle of dreams and while half awake.
Clearly he was thinking a lot about us, who he might have felt as his captors at the time, trying to get a footing...