Fixed entity destruction crashes caused by hierarchy pointers not being updated