Best is to add this to a jira issue. I'll give it a quick look...
Can you also add something to the docs on when/how to use this?
Sure, will add some information to user guide in section 5.8 HistoryService and post it here as a patch or to jira if there will be an issue.
Thanks for help Ronald
Here comes a patch for user guide regarding - short explanation how to use and when to use HistoryActivityInstanceQuery with processInstanceId.
Hope it is good enough to be added to docs.