[sc-memory] Fix problem with iterator using (#179)