I have attached a patch that fixes this problem.