Minimal failure case for runtime scope issue involving type classes