LayerSpec fixes for optional fields.