Prevent cleanup of dead models

Fixes Model mutation performed after bundling errors with Model.cleanup
in the stack trace