Fixed performance regression from e6375cd.