Fixes System.arraycopy behavior when src == dest