Cleanup: use Assert rather than C assert. (#1052)