fix error when copying a block with internal module insatnces.