Fix build if RINGBEGIN is not defined (bug #6166)