Why AbstractJqlFunction.getValues is called twice when there is a project clause?

Hi community, I’m writing a plugin that defines a JQL function but I’ve observed that the AbstractJqlFunction.getValues method is called twice when I include a project clause (besides my terminalClause), and what is more strange is that it is called once without the project clause (determinedProjects set is empty) and the second one is called with determinedProjects filled properly. Any idea of why this occurs this way? This topic had been asked before in the regular Atlassian community without a response:

and

Issue is replicable on both Jira Server 7 and 8.