Fix last-resort depth 0 check when the chain has multiple certificates