Make sure element assignment is handled correctly

Add spec examples for assignment of type x[i] = y
for all cops that have special logic for assignments.
Fix problems where they are found (just one place).
Merge pull request #1489 from jonas054/fix_missed_assignment

Make sure element assignment is handled correctly