Yes it should fail... I was playing around with some rules (I found "W gives Z the creeps" to be a common English phrase on Google), but unexpectedly it produced the above rewrite step.
I guess the natural reason for this is that X, Y, W and Z are supposed to be people, but "X loves" is not a person. So it's the semantic information that resolves it.
Without built-in types, I can add separate clauses saying X, Y, ... are people. Another solution which seems feasible is to have rules like:
someone gives another person the creeps...
where explicit variables are eliminated, and substitution proceeds by rewriting of equals -- for example with:
john gives mary the creeps....
using the rewrite rule (or equation, if not oriented):
john = someone
mary = a person.
Narrowing seems to be a quite powerful mechanism...
KY