Make select_all on query cache accept a Relation without binds.

[fixes #14361]
[related #13886]