Invalid Outline ID

I've been getting the attached error message quite frequently over a couple
of months now - basically that the file contains an Invalid Outline ID.
When the file is opened the outline in question always appears as a black
hairline, not the rendered thickness or colour. I can't think of anything
the outlines affected have in common - thickness, colour, scaled to image,
created manually or through the contour tool,  or anything else.
Oddly the fault doesn't appear to be consistent; the file may show it on my
computer but not another when it's opened there and visa versa.  Sometimes
it appears after I've opened the file a dozen times.
Any ideas?
Thanks, Colin