The solution of
XWIKI-16909 introduces a regression for an existing behavior. It is not possible anymore to have an authenticator that is not defined in xwiki.cfg file (i.e. enable automatically the authenticator when is installed).
For example, the Active Directory application provides an authenticator that does not require configuration in xwiki.cfg nor the XWiki restart (improvement that would be nice to be applied to other authenticators).
So, it looks like we should check also the previous authenticator indicated in xwiki.cfg (in case there was one) but also to consider the case of an authenticator that is installed on fresh XWiki instance, when no previous authenticator comes in discussion.