Trap door can be detected with high perception, and it's possible to go down with high stealth without provoking anyone. If remove curtains and go back, Rag will have this "dialogue" even if he didn't see you and you didn't talk to him before (he is probably supposed to say it only when he is in the basement). The hatch itself is also bugged, and if try to close it, you'll end up in the basement, but it will be closed when you go back.