Simpler fix for #5402