Fix replicated dialog profile management in distributed systems

- replication-receiving instances must not do any profile-related
  DB queries
(cherry picked from commit 20c92450fac2fd45506f759f7b19473a3dc657f9)