Fix issue #7072 : can't create a feature when a layer has a join

It works fine with my data but not sure this is the best fix..