This function is overkill -- just inline its code in the one place below where it is needed.