When does Views check node_access permissions? I'm using the book_access module (https://www.drupal.org/project/book_access) and I'm finding that it has a good deal of bugs in it.

One thing I've found is in views 3.x, when I'm using a relationship to add the data for the top-level book in a view, and grouping the view results by the top level book, every node that isn't currently in a book doesn't show up since it seems that views isn't getting access permissions for anonymous users.

Though, when book_access is disabled, or if node_access permissions are bypassed, these items nodes show up in the view for anonymous users without any issue.

I'm trying to troubleshoot this, and I'm wondering if anyone knows the exact point at which Views 3.x takes node_access permissions into account so I can muck with some debug statements, etc. Can any one help out?
Views adds the node_access tag to it's queries, which allows the implementation of hook_query_TAG_alter in the node module to intercept the query and the joins needed to respect node access grants.

The "Disable SQL re-writing" checkbox in the Query options under the advanced settings for the view can disable this behaviour.