optimizer: Don't try to sort, since it was causing a generics error

If it interests anyone, the error was:
https://gist.github.com/lahwran/6cd70ba85cb6e31fa41b