replaceSymbolsInJavaScript: Don't break when replacing bracket notation with a number, and add support for non-constant expressions in bracket notation.