bugs.core_4360_test. SELECT from derived table which contains GROUP BY on field with literal value returns wrong result

Show cross-report outcomes.
Full history of outcomes and elapsed time, ms:
NN SNAP_INFO CS_outcome SS_outcome CS_run_time SS_run_time CS_run_beg CS_run_end SS_run_beg SS_run_end
1 3.0.13.33809 2025.05.06 28ad0 P P 836 418 2025.06.30 14:41:34.425 2025.06.30 14:41:35.261 2025.06.30 13:53:36.429 2025.06.30 13:53:36.847
2 3.0.13.33808 2025.04.25 28426 P P 1010 447 2025.05.06 13:40:00.698 2025.05.06 13:40:01.708 2025.05.06 12:43:24.754 2025.05.06 12:43:25.201
3 3.0.13.33803 2025.02.25 08ebd P P 1006 489 2025.04.25 16:54:58.025 2025.04.25 16:54:59.031 2025.04.25 15:58:51.543 2025.04.25 15:58:52.032
4 3.0.13.33796 2025.01.29 0ab85 P P 1042 570 2025.02.25 15:27:35.730 2025.02.25 15:27:36.772 2025.02.25 14:31:43.365 2025.02.25 14:31:43.935
5 3.0.13.33796 2025.01.14 99b3b P P 1068 524 2025.01.28 17:41:19.460 2025.01.28 17:41:20.528 2025.01.28 16:44:14.213 2025.01.28 16:44:14.737
6 3.0.13.33795 2024.11.24 b8847 P P 965 514 2025.01.13 15:19:02.658 2025.01.13 15:19:03.623 2025.01.13 14:22:36.753 2025.01.13 14:22:37.267
7 3.0.13.33794 2024.10.15 abe09 P P 743 369 2024.11.23 06:27:31.390 2024.11.23 06:27:32.133 2024.11.23 05:44:47.137 2024.11.23 05:44:47.506
8 3.0.13.33793 2024.10.04 82ccc P P 950 437 2024.10.14 04:23:03.722 2024.10.14 04:23:04.672 2024.10.14 03:36:12.794 2024.10.14 03:36:13.231
9 3.0.13.33792 2024.08.31 d8791 P P 956 424 2024.10.03 09:29:15.821 2024.10.03 09:29:16.777 2024.10.03 08:39:13.682 2024.10.03 08:39:14.106
10 3.0.13.33787 2024.08.17 2e0d6 P P 2312 875 2024.08.25 15:10:59.063 2024.08.25 15:11:01.375 2024.08.25 13:21:47.763 2024.08.25 13:21:48.638
11 3.0.13.33787 2024.08.09 df740 P P 1215 558 2024.08.16 12:43:46.021 2024.08.16 12:43:47.236 2024.08.16 11:47:28.456 2024.08.16 11:47:29.014
12 3.0.12.33746 2024.07.15 11dd4 P P 1413 616 2024.08.09 12:40:47.031 2024.08.09 12:40:48.444 2024.08.09 11:42:27.913 2024.08.09 11:42:28.529
13 3.0.12.33746 2024.06.11 8a5eb P P 834 375 2024.07.15 10:32:10.053 2024.07.15 10:32:10.887 2024.07.15 09:44:14.686 2024.07.15 09:44:15.061
14 3.0.12.33744 2024.05.09 9cf37 P P 832 308 2024.05.12 15:40:04.941 2024.05.12 15:40:05.773 2024.05.12 14:56:19.780 2024.05.12 14:56:20.088
15 3.0.12.33744 2024.04.20 af6b2 P P 687 288 2024.05.08 16:55:40.113 2024.05.08 16:55:40.800 2024.05.08 16:14:18.078 2024.05.08 16:14:18.366

Elapsed time, ms. Chart for last 15 runs:

Last commits information (all timestamps in UTC):