[brace-fold addon] Fix bad use of lastIndexOf