fixed a bug in enumeration with bound variables and allowed enumeration to be in order of increasing depth (via depth_to_terminal)