Fixed a bug with deferred execution and non-object promise initialisers, and wrote a test to check for it in future.