Quest assignment fails when NPC is underground

A NPC followed me into the basement, I asked for a quest, and it gave me the USB one. I got the debug message:

“C:\cygwin\home\Kyratzes\Cataclysm-DDA\overmap.cpp[827]: overmap::random_house_in_city(-1) (max -1)”

And the quest now points to -1 -1 in the ‘M’ screen. And the quest is obviously broken now.