TW-27930 Fixed npe during wait reason creation when no locks are acquired on the resource