JPM: prevented the same prefix or set from being added repeatedly; returning Python sets instead of JArray objects from getPrefixes and getSets to make the 'in' operator work as expected.