Don't wrap asserts in a RuntimeException

Proposed fix for issue #1636