Do not raise exception when an invalid index is seen. Raising exception causes initialization to fail. We can handle the error better by returning -1 instead

Change-Id: I253085b12008e51f80431f3de86788b83428aa2e