Fixed infinite recursion when using flatten on a List with Strings