`current_user.email` not evaluating and failing queries

In some DynamoDB, MongoDB and SMTP queries we use {{current_user.email}} to log who did the action. On one specific app, everytime we a make release, we get errors that this is undefined and it gets fixed automatically after couple of hours. This is a module and we use it some business critical apps and it triggers a lot of operational escalations.

  1. Its not always reproduced. I have seen it in actual app (never in edit mode) may be couple of times
  2. Other users have also randomly reported it.
  3. It does not happen with other apps, we use {{current_user.email}} in many app and modules)

Here is a link to the app https://smiles.retool.com/apps/ticket-general-module-v2?ticket_id=65dc5e863caebd2eac5d0965&_releaseVersion=0.1.64

You can copy it, and please make sure to use STAGING.