lslcleanup: Variables renamed, order changed, comments added. Other changes: remove semicolon at end of sentence, use self.Cast instead of creating a CAST node on the fly.
If the list in brackets is SEF: [a, b, ...] -> (list)a + b + ... ListExpr + [a, b, ...] -> ListExpr + a + b + ...