Range-based for() bug fixes.