Howdy,
Without seeing your project layout in the Layers List, I can only guess, but it sounds like a police-taping (rasterizing) problem. Basically, when doing 3D compositing, something can force the application to have to render objects separately and comp them together in layer order, rather than 3D depth order. This happens in all 3D compositors (Motion, AE, Shake, Nuke, etc).
It sounds like your text object or one of its parent groups has gotten rasterized (also called “police-taped”), which means that the rasterized object and its children will be comped into the scene in the order you see in the Layers List, regardless of 3D position. So even if your pill image is in between the camera and the text, in terms of position, the text will always have to be comped on top or behind, depending on the ordering in the Layers List.
Does the text object have a small box around it like this: 
That box indicates that the text has been rasterized. The same result would happen if the text object’s parent group was rasterized (though it would be the group’s icon with the little box around it). If you do a search on “rasterize” in the manual (or the 3D supplemental docs) you will find a list of conditions that can force rasterizing.
It may not be any consolation, but this is the trickiest concept that exists in 3D compositing. You wrap your head around this and everything else is small potatoes 🙂