Those religious techs are just as valuable to the AI, whether a religion is received or not.
Umm... no... they are valuable by precisely their full amount (which includes the values of units, wonders, religions, and everything else that is unlocked, added together), minus the religion which cannot be founded.
Every new ability, every benefit, in the game has a value. They are actually coded numerically (in the XML for units and in the SDK for everything else) in a variety of ways. One can debate the correctness of those values, but it is silly to say that a tech is still worth 100% as much overall when ONE of the benefits of the tech, not all of them, no longer applies. Please keep in mind, each tech that is chosen to research also comes at the cost of not choosing other techs as the current one. Perhaps losing the religion puts that other tech they were eyeing just over the top... Or perhaps the value of the wonders still outweighs any other option they have and they will research it anyway. Both are possible, but the AI should be free to decide this for itself as intelligently as a human would.
(Techs with wonders are actually valued more highly numerically by the AIs in my mod than in vanilla and other mods btw; I had a heated discussion with some people in the Better BTS AI forum about that a few months ago heh.)
It is not a game-breaking drawback to your component, but it is not ideal. AIs still think they're getting religions, in addition to everything else, with these techs, and are planning their research accordingly. It affects not only their current research but their directed path, up to one or two tech columns deeper in with the vanilla code, I forget.
Since this particular feature was not one of my more recent things, the code has been available this whole time over in my
MongooseSDK thread btw (look for ReligionMod down near the bottom, and in the source). Merging SDK components is certainly more complicated of course; just pointing out the option.