Fix #1091: Improve genPrimitiveJSRepeatedParam for arrays of primitive types.