Remove bogus self-assigned loop field.  From upstream.
Fix compare to actually do the right thing.
Because of the way we do substitutions we (currently anyway) need to
set prefix=@prefix@ and includedir=@includedir@ here. Fixes PR 48991.