It seems pretty clear to me; so, I don't know how to help you. Deprecated locations don't fully specify the location. In particular, they leave out run. Getting a LocationField from a sql db results in these incorrect Locations. Such Locations will not == they're correct counterparts which "mean" the same xblock or could mean the same xblock but is ambiguous due to the missing run.