Fix unit test regressions (wrong inbound references assertions, missing transaction and fail() to ensure correct test).
Fix NPE in getFullList() (for empty lists) now used in FlatTypeMapping.
Improvement: Adds a parameter to data model type sort ("strict" for unbreakable cycles and "lenient" for taking into account optional FKs).