I think the code fixes the issue that is with [] which is a corner cases. Not sure I get your last point.