Removing Stack.type_of_last_lvl, the type is now in the Stack.t type.
Program fails in a repertoried way ( https://coq.inria.fr/bugs/show_bug.cgi?id=1956 ).
Use an inductive to discriminate the cases for Program in [do_regularize].

As it "does not deal well with the various features of extended pattern-matching
when used with inductive families" (see Matthieu Sozeau's comment on the
tracker).

Doesn't help.
[do_regularize] now dispatches to dedicated function (Program still fails).
Type annotations result in a clearer error message from Program.