more general 'if tag inference