Only call RemovePersistentVariable on expr_result if that shared
pointer contains something.