Fix phantom test failures

Changed CDBMessageIndex so that it actually creates an empty cache
to avoid recursion. Also decrement recusion count before returning,
to prevent all subsequent calls triggering a warning message once
it has been triggered once.

Change-Id: Ia0e0f5bd7ef53aeb8312a4e448f8c6f68fbcb15c
Merge "Fix phantom test failures"