Bug 885179 - Refactor visitMoveGroup into shared code. r=jandem