NEXUS-5472: Concurrency issues

Protecting read/write access and "edit" access
that were spotted during code reading.