Fix stateful inspection not always inspecting at stream end.
Fix sig grouping bug when certain sigs are mixed. Add tests.