Here is the patch that fixes the problem.