Compliance with Travis CI build strict mode (refactors an inline
function to a more normal private method).