Fix refactoring that was too enthusiastic