Use name not label for custom field lookup
This is pulled from !78 (closed). When checking to see if the custom field exists already it should use name not label. But since we didn't used to set the name ourselves have also added a paranoid fallback in case core used to set the name differently from the way it currently does.
The remaining line from the other merge request about html_type seems to have been already done a while ago.