small efficiency improvement in subassign to list
fixed bug in assignment of repeated element to list array, tests to check bug