[tests] Fixed tests that were dependend on the order of the test methods
[tests] Attempt to fix more failing tests
[xbase][typesystem] Removed duplicate code
[xbase][typesystem] Fix: expected type was wrongly computed in some cases

If the type computation was performed multiple times for the same model,
the expected type for implicit receivers / arguments was potentially wrong