Fix encoding of type1 private dictionary arrays.

Code taken from #2864.  Just curios if it changes anything.