fix off-by-one error in corefinding goal identification