Added support for detecting loops and false masters.