This is kind of yucky (especially the fact that I have to call `self.model.dispose()` in a bunch of places...but that's because I can't dispose it until after it's removed the marked extensions if any, and that can happen asynchronously). Suggestions welcome.