This is an unrelated fix, we probably don't want to do this here. It's possible that there may be a perf benefit, but often ES5 stuff like this will perform slower than a for-loop, so I think we'd want to measure this before making this change.