Can we rename this function to _createRelatedQuery. This makes it clearer that we're using an internal function.