IE7-/Win: Lost margin top for a box following an absolutely positioned one

In a container (the light gray box with striped background and border) there is a box with a margin-top. In IE7-/Win this is ignored if the box is preceded by an absolutely positioned sibling. In IE7 this happens also when the box is preceded by a fixed positioned one.

Absolutely positioned
Static, margin-top:50px, follows an AP box in the source

If the box precedes the absolutely positioned one the problem does not occur.

Static, margin-top:50px, precedes an AP box in the source
Absolutely positioned

The presence of an empty box between the absolute and the static one fixes the problem

Absolutely positioned
Static, margin-top:50px, follows an AP box and an empty static one in the source

position:relative on the container (and/or on the inner box with the margin-top) has no effect on the problem.

In the above cases both the container and the static box have hasLayout. Presence/absence of hasLayout causes many similar problems with nested boxes: IE7- wrong collapsing, disappearing of margins and hasLayout. The current problem does not occur if the static box does not have hasLayout, but of course this is a rarely usable fix.

Absolutely positioned
Static, margin-top:50px, follows an AP box in the source, NO hasLayout

CSS tests home