JC-1674 
* fixed wrong behaviour of  [*] tag outside of the list
* fixed problem when the [list] tag present but there is no [/list] tag
* little refactoring, more accurate error processing