Make wait_all work with deferred futures