Fix then() bug due to clobbering namespace.