[jhc] darcs patch: Fix kind inference + test