Constructive res-judicata is contained in explanation IV of section 11 of the code of civil procedure as any matter which might and ought to have been made ground of defence or attack in such former suit shall be deemed to have been a matter directly and substantially in issue in such suit.