Use of Collections.copy is unnecessary and was throwing an IndexOutOfBoundsException.