*partial backport of a fix to allow subpatches to be renamed with no arguments without losing their inner content (see g_text setto call). Thanks to Jonathan Wilkes for the bug report.