Core: Simplify and speed up .each

Closes gh-1510