This looks indeed like a bug. But I've just tried your code and it does not happen here.

Can you upload your test project or send it to Support? We'll look into it.