When I run my test, without making the changes specified in section 7.3.2.5, I don't have the problem described in the book.
It appears to me that the context menu created in code is not the same context menu created in section 6.3.1.
Anyone have any thoughts?