Take care of #5639 without hardcoding the array size.