Would there be the same problem even if the script would be inserted under the last body?

I mean, in your example above, the last <body> is inside an IF structure... so the scripts would be inserted inside that IF too, and would there be a problem with IE 7,8,9 as they would not use that IF at all?

Interesting issue if I may say. But can you tell your use case? I can't see a practical case of a script that should be registered in the beginning of the body, that can't be registered in the head itself (ie POS_HEAD instead of POS_BEGIN).