I changed this in the source of lxml-ini.lua (line 225). It seems the 'not' has been accidentally crept in (from  copying that line in ifxmlempty, the item above?)
Anyway, remade the format and now the result is as I expected it to be. See below in the output of the MWE from my first post on this subject. I added the relevant portion of the code for clarity.

I am sure the next update will reflect it in the source ;-)

dr. Hans van der Meer

   implement {
        name      = "ifxmlselfempty",
        public    = true,
        usage     = "condition",
        arguments = "argument",
        actions   = function(id)
--            return boolean_code, not checkedempty(getid(id)) and true
            return boolean_code, checkedempty(getid(id)) and true
        end
    }