Improve some state handling...

... Want to cause the batch operation to be called more often,
forcing a new PHP instance to be created. Should help with the
stability in longer running processes.