fix(block_factory): should not call attach when scope is destroyed