Impersonation is losing the real user if browser is closed/restarted

There seems to be a change in the way impersonation is handled since version 12.1.1 (maybe earlier) 

If you impersonate a user, close the browser, when you return to the site you now appear to be logged in as the user you were impersonating with the links to stop impersonation gone rather than still appearing to impersonate them

So for example if you impersonate a user and close the browser without stopping the impersonation, the next time you visit the site you appear to be logged in as the user you were previously impersonating

Comparing the cookies to an older version the impersonation cookie te.u is now a session cookie when before it had an expiry date so when you revisit the site it no longer exists and the community no longer has any knowledge of the impersonation 'session'

The authentication extensions below therefore no longer think you are impersonating and any links/banners relating to impersonation are gone

e.g.
#set ($isImpersonated = $core_v2_authentication.IsImpersonated())
#set ($impersonator = $core_v2_authentication.Impersonator())

I have been able to replicate this in clean builds of VerintCommunity-12.1.1.20482 and VerintCommunity-12.1.2.21517