a2c24e696f
This seems to be the only reasonable way to provide function declarations with _correctly_ substituted type parameters without rewriting logic from scratch; correctly scoped type parameters in IR are now required in serialization plugin by all backends. Also fix some missing upper bounds.