Reintroduce the process ID check.

No idea why it got removed, but it's back. I've also added the reverse test.