I just tried to use deleteTemplateBlock to remove a table when a list of items is empty, just like you try to do in your demo. However, only the tags $BLOCK_table$ are removed, not the actual content (a table, just like in your demo). I tried your demo with the IE and Firefox, LibreOffice and Word 2007, in all combinations the table is also still there in the final document.
Am I missing something? Did I not understand the idea behind deleteTemplateBlock()??
Would appreciate some hints and/or fixes...