We currently don't have any tests for remangler error handling, because in asserts builds it asserts. This patch adds a flag that only exists in !NDEBUG builds to turn off assertions when inside the unit tests.