4.25 Crashes when trying to delete foliage

Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:\Build++UE4+Licensee\Sync\Engine\Source\Runtime\Core\Public\Containers/Array.h] [Line: 674] Array index out of bounds: 61419 from an array of size 61338

This is the error message I get. Unreal crashes when I put more than a hundred thousand foliage into my level and then I try to delete them with the brush tool. This only happens when ray tracing is enabled.