Unai Emery’s second-half changes proved inspired.