Fix a crash due to carried item refcount (fix #307).
Reindent.