Fix some problems with:

- Flattening CTyAppEqs
- Higher-kinded typeclasses