MISC: add assertions to index.js.
PARSER: ensure loose mode never throws.