Also sort flags.