[PATCH backport for 4.19] tee: handle lookup of shm with reference count 0