actually, your right - it was almost 4am here when I posted that and I was a step behind myself.
What actually got rid of this problem for me was commenting out that entire line, which will obviously more than likely break something else but it did allow me to validate pics in the meantime...
Maybe moving the line to above where global.php is called would work fine?
sorry zogue & anyone else who tried my quick not-fix