Fix order of layer validation