Fix some bugs relating to display fields for new vector layers (fixes #8311)