Issue #1433558 by David_Rothstein: Fixed EntityMalformException when media gallery files no longer exist in db