The witch's curse on the baker's father is quite clearly that he will have no further posterity than what exists at the time of the curse. Just before they make the potion, the witch tells him This had better work, or your son will be the last of your flesh and blood.
Though Rapunzel was taken by the witch, and adopted as her own, she is the baker's father's flesh and blood.
After she is cast out, Rapunzel bears a pair of twins. The curse was surely lifted by the time the twins are born, but it seems most likely that the twins were conceived during one of her prince's visits, while the curse was still in effect.
I think the curse should have applied to Rapunzel as well as to the baker, and that it should have prevented her twins from being conceived.