Optimize retracting old runtime clauses when redefining an entity