Add length checks to the wood functions, and fix wood_hessian1().