$paged always 0 on plugin’s custom page

I resolved this myself. The problem being:

add_rewrite_rule('^foobar?','index.php?is_foobar_page=1','top');

Which prevents any other query_vars from being created. To resolve this, a slightly more complicated rewrite rule combo is set up:

add_rewrite_rule('^foobar?$','index.php?is_foobar_page=1','top');
add_rewrite_rule('foobar/page/([0-9]+)?$','index.php?is_foobar_page=1&paged=$matches[1]','top');

This takes into consideration the creation of the plugin’s subpage ‘foobar’ and also allows for pagination within this page.

Hope this helps someone.