This relates to when a Custom Query Layout is selected.
According to an issue Bruce discovered, there could be a bug, depending on the answers to the below 2 questions:
Are Item Operations intended to be used with a Custom Query Layout, bearing in mind that Item Operation buttons usually won't display on an Instance which has a Customm Query Layout (subject to it's HTML/CSS)?
If, 'yes', then, is only a Default Item Operation intended to be used (hence why the 'Operations with items' panel still shows when Custom Query Layout is selected)?
If the answer to either of the above it, 'yes', then there is a bug according to Bruce's experience/advice:
"When a Default Item Operation is selected/activated on an Instance which has a Custom Query Layout, the wrong ID/Instance is written into Context"