Fix bug causing some refactoring test failures.