Hi Dale,
indeed it seems to be some kind of bug in VS2017 for which false positive errors are noified, even though code has been correctly built.
It depends on the option you build the solution with: if IntelliSentse+Build errors are required to be reported, you will receive lots of false positives.
I have never found the IntelliSense errors to be of much use exactly because of those incorrect error messages. It is the first thing I disable when installing VS.