fix missing headers and wrong include guards
check duplication of functions after forward analysis

The check can't be conducted in forward analysis because considering
overloading requires the information about classes and it requires
the result of forward analysis.