Changed the combinator on the earlier mapCollect output to flatMap. Works now.