Now _sort_formats should be called explicitly. _sort_formats has been added to all the necessary places in code. Closes #8051