Avoid PHP warning when CDBMessageIndex has only one key

Change-Id: I426c651d8f7995f772dc99f45a8e9ab5ee19b94b
Merge "Avoid PHP warning when CDBMessageIndex has only one key"