Cherrypick of 04379 to fix the crashing test control panel bug