Fix gradient part 3

Fix again gradients.
I don't know what happened i don't have my old code on disk to compare the differences and understand why i was already rendering all good without this additional code.
Maybe i forgot to check some tests and that's all.
Again differences for pathgroups.

Anyway now everything looks fine.