I may very well be wrong but Luna while seemingly spacey always seemed unusually aware of things around her. Her whole demeanor seemed completely off with not even being sure its him.
I think she would even hint at and give advice to harry a few times.