Only recompiling doesn't help.

But changing the order of the entities inside WED helps. If I just delete a model, click undo and then recompile, the crash is gone. By deleting and undo the deleted model is set to the end of the list in WED and that helps. Of course deleting the last model in the list doesn't help as the order wouldn't change.