When headings of the first level are nested in separated containers (like groups or macros), all of them have number 1. Similarly, explicitly set counter values aren't applied to following headings when the heading is inside a container.