Fix GetGroup never returning EmptyGroup

This is a very obvious bug:
_captureMap probably used to be a hashtable and the code was not properly refactored.

I took the opportunity to redo the method using the Dictionary equivalent logic.

Not adding unit tests for this, because the unit test project seems to be missing, and I'm not sure if you guys are going to add it or not, so let me know how to proceed.
I don't know if someone was using it for debugging.