Issue #1693336 by chx, David_Rothstein, catch | iamEAP: Block rehashing happens on every cron run.

PR for https://github.com/backdrop/backdrop-issues/issues/222
Use state_set() instead of $GLOBALS['conf'] here (which is a hack to inject into variable_get()).