Minor optimisations to group removal