Added some validation to door keypad usage

Prevents an exploit that allowed players to open doors by accessing a
nearby door with a known passcode.