Safe refactoring in the OrderSpecifier retrieving