^Well, what you said was "The woman could have been in charge simply because Scotty was off-duty." My point was that it was never suggested that she was even temporarily filling in for Scotty as the supervisor of the whole department. She was just working in one part of the overall engineering complex, and she had one or two people working under her, but that doesn't mean Scotty wasn't on duty as her
commanding officer at the same time. After all, engineering is more than just one room and a few guys. It's probably the biggest department on the ship other than sciences, so there'd be a whole hierarchy of officers under Scott -- just as Geordi had people like Barclay, O'Brien, Duffy, Gomez, and Taurik working under him. If Barclay or O'Brien reported to Captain Picard, it wouldn't mean they were filling in for Geordi while he was off-duty -- it would just mean that the thing they were reporting on pertained to their own particular specialties or assignments.
After all, as stated, the part of engineering we saw in this episode was one we never saw at any other time. So it stands to reason that it's a subset of the overall engineering complex, and Lt. Masters was an assistant engineer who ran that particular section and reported to Scotty, who was in charge of the whole department. There were probably other sub-departments with their own lieutenants in charge.