Use explicit checks for setClaim's/setReference's index parameter

Change-Id: If62023aa2898d99cb3e2d83110da19992c43272d
Merge "Use explicit checks for setClaim's/setReference's index parameter"