Apply patch for upstream issue #239.