ligd, emgm: Make grouping for geq tests work correctly

Reported-by: Yufei Cai
Reported-in: https://github.com/julian-klode/bsc-thesis-code/pull/2