Issue 3140

Add `duplicate` option to `field`, when it is true, it will not check for duplicate field definition. It fix #3140.