Improved the C++ heuristic for detecting based on included headers