src: common: closures: stop leaking "promise" to global scope