I'm not sure if I have phrased it correctly or if I have understood completely analyze() but it seems to me that: Two loops can't have the same header (even if one is a sub-loop of another, which btw is not clear what it means in this context).
Example: https://godbolt.org/z/bqo8KP