From your answer, I'd guess that the element with an id of 'header-section' is at the top of the page and, occasionally, the css rule is being applied before the rest of the page loads. This means that the expression tries to evaluate the offsetHeight of 'content-section' before that element exists.
I've a couple of suggestions about how to deal with this, but you would have to try them in order to evaluate their usefulness.
1/ Instead of making the rule based on the id of the 'header-section', make it based upon the class 'header-section. Don't add this class to the markup, but add it upon completion of document loading, via jquery - leave the id of the element as it is...
$(document).ready(function(){
$("#header-section").addClass("header-section");
});
2/ Make the rule more tolerant of the 'content-section' not being found - not sure how often the expression is evaluated, as I've never felt the need to use expression in css rules, so this may not work.
#header-section {margin-top: expression((0 - (this.offsetHeight + (document.getElementById("content-section") ? document.getElementById("content-section").offsetHeight : 0))) + "px");}
Let me know how you get on.
P.S. I've no idea what the rule is trying to achieve - I mocked up a page with what I assume is the same layout, and all it does is move a lot of the content off the top of the page, in a way that prevents it from ever being seen.