Add local generator function to account for revert of r93063 in r96236.