Use a match expression for part of Extra.selectDynamic().

I should have flattened this out to avoid one more layer of sugaring
which created an extra Function1.