Hi, I also tried to fix this bug in some other ways, it turned out I could not find better solution. I tested your patch on mips64el, amd64 and i386 ports, all works well.
Since there is a patch for the package aptitude, in my opinion quilt should be added to Build-Depends, it is not included now. Regards Sphinx