Fix `flatten' to allow to take  non-list element.