Fix a bunch of warnings with item.h

Fixes #3189