Sorry, I have been insanely busy lately.
But you need a better schema for identifying which tile has which doors.
Sadly, I have not developed such a system yet, only theorized about what I might do in such a system, so I will be of limited help.
I would recommend studying cesisco 's work here:
You might have to ask if he will share his capx with you (Or publicly).