mergeMap generics

Fixes issue #1550