Carboxylic acid derivatives do not substitute the way an alkyl halide does. They add first, then eliminate — and which one leaves decides everything.