fdo#67935 "print on group change" acted as "print in first group instance"

The "parent" group changed iff this is the first iteration of *this*
group *or* *detail* *section*.

The "parent" group's first iteration means that we are in the first
value of the parent group (in other words, the *grand*-*parent* group
changed).

Change-Id: Ia4a798cb37db2f17e7deef1058b25795bfc02648
Reviewed-on: https://gerrit.libreoffice.org/9503
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
(cherry picked from commit aa48af57531851a16204381854f1ee19ebb63a6a)
Reviewed-on: https://gerrit.libreoffice.org/9504
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>