Fix for bug 1401012

The first CLI call initializes the cli_globals global structure.
There was a loop hole that can cause this structure to be accessed
from another thread while it is being initialized and this was
causing core files in multi-threaded testing using T2 driver.

Change-Id: I13651ed241d9a4dd5973d8ab260af5de65757efc
Merge "Fix for bug 1401012"