Fixes a bug where the CoreData stack would deadlock on save