I can't tell if the behavior is correct or not but I am posting the bug non-the-less.
Created attachment 8755 [details]
test case in Strict mode
Created attachment 8756 [details]
test case in Quirks mode
I'm not sure if this is a bug either, but WebKit r15138 differs in behaviour from WebKit 418.8, Firefox 184.108.40.206 and Camino 1.0. The latter three render the box on the right side in both examples, while WebKit from ToT renders the strict mode box to the left side.
In my opinion it's a bug. Checked also in Gecko and Opera. Both browsers display the blue box on the right in strict mode.