margin-top isn't hidden when display:none is set programmatically

Doing something to cause a repaint ends up hiding the top margin (e.g. resize the window after hiding the middle block)

Bug exists in IE8, but not in IE8's IE7 Compatibility Mode

Above
Middle (has margin-top:20px)
Below