Order categories in the same way as before 774a629857888d8cd056949c30185b7eb17f4816

The old code used an ORDER BY id DESC statement, so the new code should
have this too.