https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63889
--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> --- (In reply to Kai Tietz from comment #4) is_ok has two levels of template parameters: its own and those for A. An instantiation needs to provide both levels of args as well. It seems that we're missing a call to add_outermost_template_args for variable templates.