If your current spell-target is an enemy, no-target, or a dead player... then your heals will default target to yourself.
If you are using macros that have a VARIABLE-target (<t>, <tt>, <mo>, <bt>, <f> etc) this might be happening in the line order execution.
If you are using macros that use SINGLE targets (<pet>, <1> / <me>, <2> etc.) this is less likely, but still may happen if you attempt to cast on a dead target (I believe non-existant targets still fail)