Tidying up locks in associated objects.