`-d:release` will remove any `assert` calls, apart from that it shouldn't change any behaviour, so this may be a JS backend bug.
Make sure you aren't running any procedures that have side effects with `assert` as those statements will just be removed.
