Lightly more efficient IE check loop. Fixes 660