What can cause wglSwapIntervalEXT to fail?

In a new OpenGL application I am writing, wglSwapIntervalEXT seems to have no effect. Vsync is always enabled. I opened GEForce Experience and set the vertical sync option to “application controlled”. Another OpenGL application that I wrote a long time ago is able to disable VSync with no issues. Card is an Nvidia 1080, Windows 10. I have verified that the discrete GPU is the one in use. The appropriate gl extension is present when OpenGL 4.6 is initialized. Framerate is being monitored by FRAPS in both applications.

Are there any common issues that could cause this to fail?

	void RenderingThreadManager::Render()
	{
		currentdrawbuffer->Render(vislist, this);
#ifdef _WIN32
		Assert(wglSwapIntervalEXT(0));
		//wglSwapIntervalEXT(vsync);
		SwapBuffers(window->GetDC());
#endif
	}

If the default (window) framebuffer isn’t the one currently bound as the active draw framebuffer, then wglSwapIntervalEXT() will fail. On NVIDIA drivers at least.

That is not the problem:

		wglMakeCurrent(window->GetDC(), currentdrawbuffer->glcontext);
		Assert(wglSwapIntervalEXT(0));
		//wglSwapIntervalEXT(vsync);
		Assert(wglGetSwapIntervalEXT() == 0);
		SwapBuffers(window->GetDC());
		Assert(wglGetSwapIntervalEXT() == 0);

Unless there is some side effect that I’m forgetting about that (only) makes the OpenGL context current on the thread that executes these calls, but it does not change which framebuffer is bound. Calling e.g. glBindFramebuffer(GL_FRAMEBUFFER, 0) would ensure the framebuffer of the window is bound.

The problem appears to be some of my own timing code is somehow locking the rendering thread to 60 hertz. There is no problem with OpenGL, because if I increase the main thread’s frequency the rendering thread matches it, past the monitor’s refresh rate.