Refactor PasteBeforeCommand a bit to fix last piece of #504.  I was only
updating `] on gP, not P.