Only flatten promisee list if it is resolved to a list

Close #2422