fixes https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2116 and https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2206