Fix SAM trait coercion with invokedynamic runtime