Fix swig parser: it can happen that a block has no content

Still a bit a shaky parser. Trying to improve it over time..