Fixing MSC2 API generics issues (incorporated feedback from David Lloyd).
WIP - do not push upstream