Here is a patch which fixes this problem.