Add an assert() suggested by Richard.