GROOVY-6671: make one more test pass, fix up some generics context mixups and rework sam coercion inferrence a bit