I seem to be able to reproduce this bug just by opening the "Do you want to sleep?" dialog, and then pressing Escape rather than clicking the "No" button. I did a bunch of testing today after having the bug and thinking it was caused by some party dialogue.