Yes, you're right, and more than that, the microbiome could probably be considered as a part of the immune système himself: bacterias don't let the new (and bad) ones find a place in the body. Moreover, if the immune système modify the microbiome, it's very likely that the microbiome also shapes the système. So it seems quite complexe but I'm sure those discoverys will lead to many cures (maybe for obesity, autisme, some auto immunes problèmes etc.)
Actually they just found the microbiome DNA three years ago. It was much more complexe than expected, and some doctors said this groupe of symbiotic bacterias could be considered as an organ that we never heard of before.