If the set is a collection object PID that contains underscores, for example set=islandora_sp_basic_image_collection, then replacing all underscores with colons causes the query to fail.  The correct format of the collection PID (with only the first underscore switched to a colon) is already in $value, so adding $value to the descendants array fixes the query.
Merge pull request #25 from FLVC/fix-set-underscores

If the set is a collection object PID that contains underscores, for exa...