Thank you for reporting this. I managed to reproduce the faulty behavior on our side and it seems like a bug within the AppBuilder code editor. I have logged the issue, in order to fix it for future AppBuilder releases.
Unfortunately, I cannot think of any workaround that you could use, until the issue is resolved. I apologize for this and thank you for the understanding.
I have also, updated your Telerik points for reporting this bug.