Just experimented with user-join today. There are 3 lines of code which appear in 2 places in the file which need to be changed to:
set segment_id $required_segments(segment_id)
set cur_group_id $required_segments(group_id)
set cur_rel_type $required_segments(rel_type)
(Basically, added an "s" to "required_segment".)
Also, if the user is already a member of the subsite application group, you will get an ugly error. I guess this could be handled gracefully by checking "acs-rels" first.
I will log this into the bug-tracker.