if a trace hits a wall, it returns null, and you cant set a null object with flags...
only way i think to do this is by a dll, which makes blocks data readable from the .wmb file (for fun open up notepad and load your .wmp or .wmb file in there, you'll see each blocks data type) then set flags or something according to that.
i dont know any more about this though, i wish you good luck, and regards.
PS: you could render everything as "parts", and use it as map entity to make them transparent, that would work.