I was going to provide the same exact link DB_Hunter did a couple days ago. Actually the first image DB_Hunter provided was the exact image I was thinking of in my head when I was like how the hell did Obito know? He was not there. You can only use rough theories about how Obito knew. For example maybe he somehow found out when he was talking with naruto in the inner world? I know there thoughts and so forth kind of mixed together? He also became the Sage of Six Paths or whatever form you want to call it? Maybe he was able to directly sense what was in Naruto at that time? Or during those times? It's still bothers me but I assume he must of have known somehow or else...
1. Kishimoto messed up... Plot hole! (It Happens.)
2. Obito grabbed some of the power of those tailed beasts for a different reason. Which is likely not true now. I originally though he grabbed some of the one tailed beast to give to Gaara and some of the 8th tailed beast to free bee! Both would have made sense.
I thought about this as well. However Naruto did not truly obtain there power right? At least not clearly. He did not really get a power up and we did not have any scenes of Naruto running out of power and than suddenly the tail beasts giving him Chakra like how the Kyuubi does? Or maybe they did to tell you the truth around the time when Naruto split his Charka to everyone I forget a lot of details. But Naruto had like that pow-wow with the tailed beasts in the inner world. He did not really do anything special with them like absorb them etc. So there is no real reason in my option that the 8 tailed beast could not have been present in the same inner world at that time right?
In the very least I don't remember Obito ever stating that he realized Naruto had gained powers or made an agreement with the tailed beasts? Except Naruto did tell him. But obito seemed clueless. However Sidnne your logic is not flawed,Obito did seem to know. Somehow....