fix xpath for group_name

- use current()/owner_id when embedded in another context
- use explicit comparison count(...) != 0, since xpath doesn't do
  falsiness