Make test discovery work in stack builds.

24 jobs for !540 with fix_sanitizer_builds in 14 minutes and 50 seconds (queued for 4 seconds)
merge request