Avoid race condition on view detach
Merge pull request #4536 from vishalduggal/timob-14292-31X

[TIMOB-14292] (3_1_X) Avoid race condition on view detach