Fix table join (fixes #7068)
refresh field names after all layers loaded and encoding change (fixes #6840)
Fix crash related to 38c4796
Additional fixes for table join (fixes #7068, fixes #7271)