Issue #2379057 by chr.fritsch: Fix empty/not-empty handlers