I asked:
Can the MediaWiki API retrieve the HTML of a wiki page, if that page changes its rendering based on the URL query string?
Never mind, I got it working. Just add those URL query parameters to the WebRequest object that's being used:
RequestContext::getMain()->getRequest()->setVal('bar', 1');
Then pass the WebRequest object to the DerivativeRequest (first parameter). Works great!
DanB