In the second example, no style guide will help. The writer just has to make sure that the sentence is understood as it is written. Punctuation is there to help the reader make sense of what is written. Often it is best to change the sentence so that the meaning does not rest on a comma.