Stash constraints

Not ready to merge yet; Vikram's testing to see whether this fixes our sensitivity calculations for a heterogeneous adjoint BCs case.