[FABRIC-438] Fix synchronization issues of the distributed lock.
[FABRIC-439] Limit port registry modification only when its really needed.