Make sure encryption state is processed by composition API (issue #384)
Protect critical sections in metadata index save/load/... with a lock