Fix issue with scopes clobbering each other.