Better group detection and module as group in minion migrations