New NEI feature and knapsack fix

Thanks @boq for finding the cause. Fixes #1061 and OpenMods/OpenBlocks#502. Should fix NightKosh/GraveStone-mod#18 too.