(compiler: pl0): add defensive checks.