You can't use if statements, or castspellbyname while in combat. The best way you can achieve what you want to do is using another level of target target. In the FTL system you usually have the concerned character find the target of his spell by asking for the target of another character. Now you have 1 thing working for you here, barkskin can only be cast on yourself. In order to achieve what you want to do you may have to turn off the auto self cast option. Then use the following macro
Code:
/target [mod:alt,mod:ctrl]Owltoid;[mod:alt,nomod:ctrl]Owlive;[nomod:alt,mod:ctrl]Weirdowl
/cast [target=targettargettarget,help] Barkskin; [help][target=targettargettarget][target=targettarget] Healing Touch; [target=targettarget,harm] Moonfire
/targetlasttarget
What will happen is it will find the target selected in the assist line and find his target, then it will look at the target of that target, if it's helpful it will cast barkskin. The ability to cast barkskin would only occur in 2 situations, the main is targeting themself, or the main is targeting the dps target and the dps target is now targeting the guy who just pulled aggro.
The other druids would have a false in that step and would move on to the next conditional and cast Healing Touch on the newly barkskinned druid. If you switch targets to the druid with aggro they will still be able to cast healing Touch because of the second check in the second part. If they can't find someone to heal they will revert to a druids real purpose in life moonfire spam on the red guys :D
The third line just makes the druid target the last thing he was targeting before trying this heal/barkskin business. You can omit this line with no consequence. Oh and make note of the /target vs /assist in the first line, this will make it work, /assist may not.
Feel free to change the names of spells and whatnot, Im not a druid and that's the spells I could remember offhand. I didn't try this macro in WoW so if it's too long take out the first line and place that in it's own macro, then drag that macro to the furthest righthandside vertical bar's top button and put "/click MultiBarRightButton1" in as the first line.