[sr-dev] git:master: modules_k/dialog: Simplify and refactor parts of reference counter