What you can try - as a workaround - is the following macro:
Code:
/macroicon "Cure"
/action "Cure" <t>
(Replace Cure with any other healing ability.)
What this should do is prevent you from casting Cure without having selected a (friendly) target (that's what the <t> does). While this still doesn't solve the issue of hitting the wrong target because you switched the target too late (or because of lag), it does prevent auto-selfcast.
Beware that this also prevents you from casting healing abilities on yourself while having an enemy targeted. You will have to explicitly target yourself to heal yourself. This can be annoying, but I personally got used to it (I mostly just quickly hit F1 to target myself when needed).