Also, "St. Basil the Great agrees with St. Cyprian of Carthage that with schism those who depart from the Church no longer possess the grace of the Holy Spirit, the priestly gift of grace is discontinued, and the transmission of the priesthood is obstructed. Without the transmission of the priesthood, apostolic succession, those baptized by them are considered to be baptized by laymen. Consequently, “they have neither authority to baptize nor to ordain.”
Pretty sure you are quoting things out of order or context here. Baptisms by laymen do actually count, the famous childhood story of St. Athanasius comes to mind:
Rufinus relates a story that as Bishop Alexander stood by a window, he watched boys playing on the seashore below, imitating the ritual of Christian baptism. He sent for the children and discovered that one of the boys (Athanasius) had acted as bishop. After questioning Athanasius, Bishop Alexander informed him that the baptisms were genuine, as both the form and matter of the sacrament had been performed through the recitation of the correct words and the administration of water, and that he must not continue to do this as those baptized had not been properly catechized. He invited Athanasius and his playfellows to prepare for clerical careers.[15]
So, technically it's sinful to baptize someone as a laymen, but it can be done. Naturally, in the above story, the child Athanasius being completely unaware of what was going on, is immediately absolved from any sin, but that is why Bishop Alexander instructed him not to do it again until they had become clergy.