Fix a crash in the legalization of large vectors.