remove buggy code that doesn't have tests

Additional misc cleanup:
 * properly save and restore indentation state
 * don't evaluate script blocks if text or children present