We use this construct in a lot of places. We should consider refactoring it out into a method somewhere that we pass a closure for the custom work.