BLK-45 Generalizes groupby to handle empty signal lists correctly

Signed-off-by: Oren Leiman <oleiman@neutral.io>