We have had some issues related to this very recently, and I hope they are all resolved now.
To be sure, I replicated your steps, creating an SCM inventory source, then using it in a job template. Using the limit “groupAB” targeted all 4 hosts as expected. Repo I use to clone is here:
So this looks like a pretty clear case of it being fixed in current development branch of the code, but something that people running older AWX like 2.1.0 may hit, and will definitely notice.