I thought that I was having problems because I was creating a new gallery with the same name as the orphan. It turns out that if I create any new gallery (with any name), I have problems.
I had an existing gallery named "PuMP ID4". (Long story...)
I created a new gallery named "Test". I then launched the Fotobilder client. I clicked Choose..., which opened the "Choose Gallery" window. The window listed only one gallery, the existing "PuMP ID4".
I clicked the Update List button. The window still showed only a single gallery, but it now lists its name as "PuMP ID4, code" When I click Update List repeatedly, it sometimes displays the gallery's name correctly ("PuMP ID4"), sometimes incorrectly ("PuMP ID4, code"), but it never displays the new gallery ("Test").
I don't know what's going on, but I think the client is combining the gallery name with an error message.
I deleted the "Test" gallery, and repeated the test on the client--the client changed the name of the existing gallery back to (the correct) "PuMP ID4".
I created another new gallery (named "Test 2"), and once again, the client has the same problem. It doesn't display the new gallery, and sometimes it munges the name of the existing gallery.
I tried creating a new parent and a new child, and the client started giving me the problem I had yesterday--when I click Update List, it said "Gallery 14 unknown". (It does this regardless of the name of either gallery, so evidently, my theory yesterday is wrong. There isn't a problem because the new "Iraq" gallery has the name of the orphan gallery. Rather, there's a problem if I create any parent-child gallery pair.)
If I create two new galleries, and both are at the top level, I don't get the error message, but the "Choose gallery" window only shows a single gallery, regardless of how many I have.
Basically, my orphan galleries (if that's my problem) have completely screwed up the client for me. I can use the web interface just fine, but if I create new galleries, the client doesn't work for me--at least, it doesn't work for anything more than uploading to the "unsorted" area.