Remove duplicate array keys.

Values were the same, so this is merely a very slight performance fix.
Merge pull request #1789 from jezmck/master

Remove duplicate array keys.