I have filed a bug and proposed a patch:
https://openacs.org/bugtracker/openacs/com/acs-lang/bug?bug_number=2006
I thought it might interest others. Regards, Giampiero