See Parsoid output for includeonly blocks
[subbu@earth:~/work/wmf/parsoid] echo "foo <includeonly>''x'' [[Link]] some '''bold'''</includeonly> baz" | parse.js ... <p data-parsoid='{"dsr":[0,65,0,0]}'>foo <meta typeof="mw:Includes/IncludeOnly" data-parsoid="{"src":"<includeonly>''x'' [[Link]] some '''bold'''</includeonly>","dsr":[4,61,null,null]}"/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":"","dsr":[61,61,null,null]}'/> baz</p> ...
The parsed content is stuffed in data-parsoid and not exposed to clients. This should be fixed to expose the content in some way. This should be done carefully to ensure that the HTML for that hidden block doesn't interfere and change the surrounding page. So, probably the best solution is to expose this in the data-mw attribute just like for <ref> tags and other extension content.
This will fix the original bug report of visual diffs not reporting changes inside <includeonly> blocks.