Bug in previous patch

forgot to actually call the new utility function at the place it was
extracted from