@this-that-the-otter : If possible, can you please try your code on fresh local AEM instance and see if it still does the same? If it works properly on new instance, maybe something was changed on your instance which is still causing this issue.
Also, you can try to check if there is a code change w...