Patches provided by Joel Baker in PR 22253, verified by myself.
major changes: -xX improvements, IPX improvements, and so forth