Fix datatype deduction for lists.