refactor head mismatch inspection and a quick fix for it
add named funs support to head mismatch inspection