Fix crash when process layer with empty sublayers

Fix crash when process layer group with empty sublayers. See tests/psd_files/empty-layer.psd
I am sure that tests for this bug can be more good, but have no spare time, so commit this variant of test code, sorry.