Flush cache before normalizing block

`normalize_block()` was unable to find newly inserted resources (for instance, during `manage_schema()`). This commit fixes that by flushing the cache before the `m_rsc:rid()` lookups.

Please backport this to release-0.10.x.