Fix clothing crash

Since nobody else seems to want to do this I figured I'd implement the solution unikmhz listed in the issue.

Fixes #9717.