Fix compiler errors from secondary index pull