Fix "Editing features changes the feature type."

Fixes #310