Fix for pattern matching with prefix with dependent types.