Fix ArgumentOutOfRangeException in OrderedCollection.CopyTo().
Consider:
var dict = new OrderedDictionary<int, int>() {
{ 1, 1 },
{ 2, 4 },
{ 3, 9 },
};
int[] dest= new int [5];
dict.CopyTo (dest, 1);
In the above, we're copying the OrderedDictionary contents into the middle of
the `dest` array, which is perfectly acceptable.
However, this would result in an ArgumentOutOfRangeException, because CopyTo()
would loop until it hit the length of the destination array, which can be (is,
above) larger than the dictionary itself.
Result: ArgumentOutOfRangeException when indexing into the backing List<int>.
The fix is to instead loop until we hit the maximum index of the dictionary,
not the maximum size of the destination array.