Set layer reference when adding feature to a layer