Changed semantics to keep loop depth for minor scopes