Catch STALE_STATEMENT and retry in CLI