fix add feature with feature service with multiple layers
improvements to handle layer idex