After a test run through a building, I think this really needs to have this not apply if the player is in a covered vehicle.  The good news is it's quite simple, take a look at the start of map::step_in_field() for an example of testing whether the player is considered inside a vehicle.