Supposedly, a random NPC cannot be placed in an occupied square, even if they'd be able to move onto the square usually. This doesn't always work, though, resulting in situations like this. I plan to sit down some day and completely redo the placement function; at the moment it just keeps randomly trying tiles until it finds one that (supposedly) works, but it might be more efficient to create a boolean array of tiles and eliminate the illegal ones. At the very least this second method should be less buggy.