Sort handler names to ensure consistent behavior between Jython and Python