Changed is_in_branch condition for is_in_room condition and check room is defined before showing IN/OUT button - refs BT#8194