This seems connected to
FS#358. The patch above should solve both, at least in terms of functionality. I have the same problem, but the code patched here has been factored away in the recent versions, so I can't confirm it works.
Can this change be added to the main version?