[relate][get_turns] fixed incorrect dispatching of static masks, tag_base<> replaced by group_tag<> and moved to namespace detail, added group_dim<>