Update ArrayPackedSet.java

check "other instanceof ArrayPackedSet" before doing the cast...