Fixed a bug with late root level delclarations

Fixes a problem with root level declarations coming after an array declaration, sorting them to the front.
[
	'x' => [
		'y' => 'testValue'
	],
	'late' => 'value',
];