#165611: Cached queries could have their args replaced twice, causing percent signs to get messed up.