Moved gold initialisation to earlier point, fixing bugs #20853 and #20734