core: proper inference in kind functions