FINALLY figured this out. Fix is up on dev.
Turns out I was very close, and the simpler matching code in the item drop screen was the key. Fixing that was a matter of moving a single )
, and then I was able to keep poking the sales code until it worked.