bug: Fix issues when reloading dynamic types

* Fix recreation of kleisli model endpoints by adding detection of such
phase in mmtf.
* Fix hierarchy iterators scrambling order of elements.