When fetching through the REST endpoint, the wrong tests are being returned for a task. This seems related to when a task is being restarted and the second execution is running. Instead of being able to get the tests for the first execution, an empty array is being returned. When the second execution has finished running, tests are able to be correctly fetched for each execution.
Example task: https://evergreen.mongodb.com/rest/v2/tasks/mongo_java_driver_tests_netty__version~6.0_os~linux_topology~replicaset_auth~noauth_ssl~nossl_jdk~jdk8_netty_test_d5d14505b0006d90e33622c386e804e331cd0a2b_22_06_01_18_55_05/tests?execution=0