### Godot version

v4.0.3.stable.arch_linux

### System information

archlinux

### Issue description

The code below will crash the engine without any error or warning from the editor.
```
var arr := [1,2,3,4,5,6,7,8,9]
func _ready():
	print(arr.slice(50, 0, -1))
```
Here the console log:
```
handle_crash: Program crashed with signal 4
Engine version: Godot Engine v4.0.3.stable.arch_linux
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /usr/lib/libc.so.6(+0x39ab0) [0x7f886a04fab0] (??:0)
[2] /usr/bin/godot(+0x46ee2f3) [0x56088fdb82f3] (??:?)
[3] /usr/bin/godot(+0x472b175) [0x56088fdf5175] (??:?)
[4] /usr/bin/godot(+0x47383d8) [0x56088fe023d8] (??:?)
[5] /usr/bin/godot(+0x1512883) [0x56088cbdc883] (??:?)
[6] /usr/bin/godot(+0x13fa8fd) [0x56088cac48fd] (??:?)
[7] /usr/bin/godot(+0x2e5fe23) [0x56088e529e23] (??:?)
[8] /usr/bin/godot(+0x3389728) [0x56088ea53728] (??:?)
[9] /usr/bin/godot(+0x48ba7a8) [0x56088ff847a8] (??:?)
[10] /usr/bin/godot(+0x2e28d96) [0x56088e4f2d96] (??:?)
[11] /usr/bin/godot(+0x2e28d37) [0x56088e4f2d37] (??:?)
[12] /usr/bin/godot(+0x2e5d5bf) [0x56088e5275bf] (??:?)
[13] /usr/bin/godot(+0x2e5eb33) [0x56088e528b33] (??:?)
[14] /usr/bin/godot(+0x10a1479) [0x56088c76b479] (??:?)
[15] /usr/lib/libc.so.6(+0x23850) [0x7f886a039850] (??:0)
[16] /usr/lib/libc.so.6(__libc_start_main+0x8a) [0x7f886a03990a] (??:0)
[17] /usr/bin/godot(+0x10afda5) [0x56088c779da5] (??:?)
-- END OF BACKTRACE --
```

### Steps to reproduce

n/a

### Minimal reproduction project

n/a
CHECK(int(arr[1]) == 4);
	CHECK(int(arr[2]) == 8);
	CHECK(int(arr[3]) == 10);
	REQUIRE(int(arr.pop_at(2)) == 8);
	REQUIRE(arr.size() == 3);
	CHECK(int(arr[0]) == 2);
	CHECK(int(arr[1]) == 4);
	CHECK(int(arr[2]) == 10);
	
	REQUIRE(int(arr.pop_at(-1)) == 10);
	REQUIRE(arr.size() == 2);
	CHECK(int(arr[0]) == 2);
	CHECK(int(arr[1]) == 4);
	
	ed.clear();
	ERR_PRINT_OFF;
	const Variant ret = arr.pop_at(-15);
	ERR_PRINT_ON;
	REQUIRE(ret.is_null());
	CHECK(ed.has_error);
	REQUIRE(int(arr.pop_at(0)) == 2);
	REQUIRE(arr.size() == 1);
	CHECK(int(arr[0]) == 4);
	REQUIRE(int(arr.pop_at(0)) == 4);
	REQUIRE(arr.is_empty());
	
	ed.clear();
	REQUIRE(arr.pop_at(24).is_null());
	CHECK_FALSE(ed.has_error);
}