move.c: Fix incorrect usage of max_group