I think the attached patch takes care of it. But it would be good if others also tested it.