[MENTION=29746]paradox42[/MENTION], I canvassed the meaning of "perception" in my post.
You are interpreting "perception" as meaning "conscious awareness", which is tenable, I think, but not the only viable interpretation in this context (and in any event does not entail the relevance of intention, only of knowledge, which is different - in crminal law, for example, many jurisdictions do not treat oblique intention as sufficient grounds for liability).
But "perception" in this context could also mean "belief" or "the caster's lights", in which cas [MENTION=6683307]CroBob[/MENTION] would be correct - if the being is a foe by the caster's lights, or in the opinion of the caster, then even if the caster does not know the being is there s/he is still affecting someone who is, according to the caster's "perception" of the situation, an enemy.
Because I tend to find invisiblity OP, I would go with the more cruelling interpretation that CroBob is running. But for those who like the idea of an invisible Detect Thoughts-using scout, go with the more generous interpretation!