Fix #warnings taking exponential time to compute

*sigh*
what's the problem here? that ```node.warnings``` is called twice? why not cache it in a local variable? I don't see why your change here is equivalent and wont break things