Adds contract checking to IndexContext