Fix "double definition" error with nested case-class extraction