Precisely. The "doctrine" that unbaptized infants cannot enjoy the Beatific Vision is a natural conclusion to "unless one is born again of water and the Spirit, he cannot enter the kingdom."
The Church herself, however, has modified the literal understanding of that admonition to include baptism of blood and of desire.
And Aquinas says that God is not bound by His sacraments.
So, while one can intellectually understand the "doctrine," practically one must conclude that we simply do not know, and can Hope that these infants are awarded salvation outright through the direct action and graces of God. The Church actively promotes discussion on this topic and may yet modify "without baptism no salvation" again.
These are not modifications to the doctrine, but something believed from the start. See for example, Letter 73 of St. Cyprian, which discusses both. The Deposit of Faith cannot be modified by the Church.