Cannot restoresubshapes with proper shape names when shapes were renamed

Hi,
In a TUI script, I create an object and add some groups for this object.
I publish the object (with addInStudy) and the groups (with addInStudyInFather)

In the script, I rename some groups using: group.setName()
Then I perform some boolean operation on the object
When I try to restoregivensubshapes with a list of groups, the restored groups have a name which is the old one not the one I’ve set with setName().

What’s wrong with that?