backport header-only fix

Was: trunk-tracking: update to r3632 from 1.7.30.1