fix 500 due to a minor change in the function contract of Group.by_domai...

...n