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...
Give the absolute base url on Identify.
Merge pull request #26 from jordandukart/7.x-identify

Give the absolute base url on Identify.
Merge remote branch 'upstream/7.x' into flvc