Fixed a bug with first var in first var chain not having ode_type=1. Added more test cases for diffvars.c.