Oops, just ignore me, I think I see what's happening now. `$def` is sent to Vim literally, and Vim sees the `$` and then resolves `%def%`.