Fix bug where some locks would not be unset correctly after TileEntity unload.

Signed-off-by: Ross Allan <rallanpcl@gmail.com>