Is this not a side effect of using the macro while your gcd is still up? It will try and execute each line in succession but the first ones will fail because of the ongoing gcd. The end result being that perhaps <f> will default to healing you if your focus is non-existent or out of range?

This was what I meant about macros being clunky if they're multi lined. Especially for button mashers like myself.