So I have finally sussed it! Had to disable virtually everything before I worked out what was happening!
It seems that Groovy didnt like this:
standardTile("ArmAway", "device.armaway", ......
Since it then obviously got confused about what I was referring to. I changed it to:
standardTile("VArmAway", "armaway", ......
And then it started remembering the state correctly! I still think that is quite strange behaviour, but Im very glad to have got it sorted. I should also note that I changed the actions to VisonicArmAway aswell, but that didnt have any effect.
Thanks again for your help @krlaframboise and @tgauchat