[#826] Make Promise.{flat,}map allow supertypes