Fixed a bug of not detecting some function forward declarations.