Unfortunately, this explanation seems to fall short in explaining another verse in the Koran that says slave women also guilty of lewdness are to receive half the punishment of free women. The problem here is that permanent home confinement cannot be halved. By definition, half of a life sentence is still life behind bars just as dividing infinity is still infinity.
But if the punishment for lewdness is actually lashing (which is now a contradiction), then this passage is now clear; a women guilty of "lewdness" will receive the punishment prescribed for adulterers which is 100 lashes. So, a married slave is to receive 50 lashes if she commits "lewdness" rather than permanent home confinement. Ergo, the Koran has two contradictory punishments for lewdness - one revealed verse laid down the punishment as home confinement and another verse implies the punishment for lewdness is the same as the punishment for fornication - lashing.
4:25 - And if when they are honourably married they commit lewdness they shall incur the half of the punishment (prescribed) for free women (in that case).
4:15 - As for those of your women who are guilty of lewdness, call to witness four of you against them. And if they testify (to the truth of the allegation) then confine them to the houses until death take them or (until) Allah appoint for them a way (through new legislation).
24:2 - The fornicatress and the fornicator -- scourge each one of them a hundred stripes, and in the matter of God's religion let no tenderness for them seize you if you believe in God and the Last Day; and let a party of the believers witness their chastisement.