Unfortunately the simplest application of this idea does not seem to work. I have opened a ticket to address this issue in a separate pull request: https://bugs.launchpad.net/oq-engine/+bug/1225287