Fix yet another bug in 'deriving' for polykinded classes (Trac #7269)

This patch makes the code a bit simpler if anything.