Quote from ausador
For the door to be counted as a door by the game there must be a shaft all the way up to the sky within 5 blocks horizontally of the "outside" of the door, yes, in front of each and every door. There cannot be any opaque blocks over these shafts but you can place glass at the top to stop mobs (and yourself) from falling down them, this means no tree leaves over the top of the shafts too, they must see the sky.
There must also be more more blocks open to the sky within five blocks of the "outside" of the door than there are "inside" the "house" for the door to count as a "house". Put a solid roof over your shaft and make a ring of skylights around it outside of the door placement and it will work.
This is my underground village (also cured zombies) note the shafts just in front of the upper doors and the glass blocks over the lower doors so that they are open to the sky too.
OK, I tried what you said, and this is what I did:
Would this work? I put a stone fence at the top to stop mobs.
EDIT: Thanks! It seems to be working.