Issue #3417362 by kristiaanvandeneynde, smustgrave, quietone: Call refreshVariables() where needed in various tests