Fix #352.  Add support for '[[', ']]', '[]', and ']['.