Kaa-156: Fix blockers and critical issues reported by Sonar.

Won't it be better to compare configuration hashes before configuration?