Fixed failing test input13.q.

The bug was introduced in SharkSemanticAnalyzer when the support for
inserting into cached tables was added.