Fix a perf bug overlooked.