Document `layersDescriptor` is null if only one layer exists
I'm having long term bugs with having one layer in the Document:
ReadLayerDesc *readLayerDesc = gFilterRecord->documentInfo->layersDescriptor;

But this only happens when there's one image (Assuming the layer array is not initialized when there's only one layer present), even looking through the (FilterRecordPtr)`filterRecord` the only accessable data is the `documentInfo` property...
What's the solution to this to acquire a single layer from the descriptor with the filterRecord?