Issue #2176669 by alexpott: Stop persisting the url_generator.