I don't play druid and have not tested this... but is this closer to what you are trying to do?
Code:
#showtooltip
/cast [form:0][mod:alt] Moonfire
/stopmacro [form:0][mod:alt]
/castsequence reset=combat/7 Rake, Rip, Shred
If form:0 or mod:alt, then cast Moonfire and stop; else, cycle between Rake, Rip and Shred.