Fix for continuations on deferred futures. Fixes #1182