Factor out ?UNDEF and use it throughout to report an undefined word.