Having been shown into the office, Julia waited for the dentist to arrive.
I am having trouble with the above question. I keep thinking the modifier "having been shown into the office" modifies Julia, but the explanation says this actually modifies "waited". I know verb modifiers do not need to touch the verbs they modify, so would this be a correct sentence?
Julia waited for the dentist to arrive, having been shown into the office.