Fix for 'then()' function detection logic in Resolver.
Fix for AsyncToken wrapping logic in Promise.when().