Old behavior is to just return the cached entry regardless of opened-ness.
That feels buggy (though I guess nobody ever actually needed this).
This came up in the context of clangd+clang-tidy integration: we're
going to getFile(open=false) to replay preprocessor actions obscured by
the preamble, but the compilation may subsequently getFile(open=true)
for non-preamble includes.
NIT: not sure if it's actually that useful, but the fact that the comment mentioned that FileEntry could be uninitialized if IsValid is false was a hint that drew my attention to this.