Plugin edit-foreign: Backwards compatible default
Delete duplicate code