Reinstate sorting the crafting menu

Fixes #2431.