ceylon/ceylon-js#450 - fix some cases, break some others...
optimize/simplify chained calls to flatten-unflatten
metamodel of unflattened function
metamodel of flattened func
work on ceylon/ceylon-js#450