Check group id before adding

Motivated by FlowForwarding/LINC-Switch#191.

This depends on the fix in FlowForwarding/of_protocol#50.