The code in the question produces the expected output in XE2 update 4. Note that update 3 produces the bad output and so clearly the fix arrived with update 4. Also, XE3 produces the expected output.
The code in the question produces the expected output in XE2 update 4. Note that update 3 produces the bad output and so clearly the fix arrived with update 4. Also, XE3 produces the expected output.