Fix a preprocessing performance issue.