Here is what is going on. The header is getting built before the image loads. The underlying page offset calculation is based on the header construction, when the image is loaded in and the header stretches - the offset is not being re-calculated.
So if you add a wrapper around your image and give it the same height as your image - then the header will have the right information with which to make the offset calculation. You can also give your header itself a defined height.