PDF plugin: fix yet other race condition