I know that a comma + ing verb needs to describe the actions/result of the entire prior phrase. However, what happens if a comma + ing word follows a non-essential modifier (which itself follows the main clause). If correct, should the comma + ing word be describing the actions (modifying) the immediate prior phrase, the non-essential phrase? Or does the rule state that comma + ing words need to describe the actions/results of the entire prior MAIN phrase?
Example
• Independent main phrase, modifying non-essential clause, ing word phrase
If correct should the last phrase be modifying the middle clause that it follows, or the first main phrase?