Ha, no idea why I didn't use a short circuit in the first place. I think I just broke it into separate lines to trace the problem whilst debugging, then went from there... d'oh.