* add the fixed version of FlattenMap() and corresponding tests * replaced the old FlattenMap() implementation with a new one
* add the fixed version of FlattenMap() and corresponding tests * replaced the old FlattenMap() implementation with a new one