Yes, it's a bug in Xcode. In some cases, it works if you try again after a few seconds — presumably there was some indexing going on in the background that hadn't completed yet.
If it still doesn't work, try building your app. Even if the build fails due to errors, in Xcode 9 building also does indexing, so the attempt to build may fix whatever was wrong.
If that doesn't work either, you can try cleaning your project. I'm not in favor of randomly applying random workarounds like this, but for a beta Xcode it's certainly possible that it has missed updating some vital piece of derived data.