I've been having my targets deselect and reselect themselves really quick if I hold down my left mouse button after targeting and let it go. Maybe something similar is happening to you at the same time you happen to be casting a heal, causing the heal to go to you instead of your target?

Just a thought.