Add asserts instead of a special return macro. #1201