Backing out one refactoring change and added a unit test for it.