On the Second Derivative Test for Constrained Local Extrema