Oh I missed that this is VaultWiki Lite.
Either way, the second database error occurs at the end of the URL rebuild, after the tab is already reset. So if it was related to any VaultWiki cache, it should already be fixed.
Is your VaultWiki version 4.0.15 or lower? There is no Lite version for 4.0.17 yet.
You can rule out a VaultWiki cache issue completely by modifying vault/config.php and changing VW_CACHE_ON to 0.
Do you use any kind of HTML cache, such as Varnish? Do you use Cloudflare? If so, check your network activity and make sure the page with the wrong tab is not being served from Varnish/Cloudflare/etc.