Fixed double encoding of callout groups.
Fixed modifications of $val in a callout resource blowing away resources.