Fix infinite loop in RecipeSorter

If recipe is multiple levels of inheritance from Object and not categorized, cls=cls.getSuperclass(); needs to be repeated more than once. It must therefore be moved to inside the while loop.
Merge pull request #1038 from planetguy32/master

Fix infinite loop in RecipeSorter