TW-36042 Cannot obtain write lock on a shared resource with infinite quota
(cherry picked from commit ec17ea3)