ways should have at least one of covered=*, location=* or bridge=* tags.

It is also possible that the area of the building and of the bridge are not identical or multiple buildings and other objects are on a bridge, in this case the building and other objects should have the same layer as the bridge object and be tagged with location=bridge