core: Fixing inference for case expressions