Fix crash with some mods that override stackLimit functionality.