Fixes entity valid state after deletion.