Probably it's just because of my limited experience with the optimizer but I don't find the proposed change particularly straightforward. I would suggest adding a comment before the Assert's and/or a detailed commit message would be helpful.
Comment is now added above the Asserts. Thanks for taking an interest in this.