pygimp: Layers retrieved using "parent" have to be GroupLayers

    Thanks Seldom Needy for spotting this.

(cherry picked from commit f7e1dd2501db4ae7201e225a9b54c5b1e168c9cb)