I wrote a tentative patch to handle this. Please have a look. Thanks, martin