May be fixed in jessie. At least the given test program doesn't seem to fail anymore. But since I don't know what was changed (didn't even get so much as a response), I can't tell if the bug has really been fixed or if it's just luck, and the bug may appear in other circumstances, so I'm leaving the report open.