Fixed infinite recursion when using flatten on a list with Strings