Internal Error: Loop through function `.IsCompatibleWith`

IDE: Visual Studio X/Fire
Version: 10.0.0.2413 (develop)
Target (If relevant): OSX
Description:
This is a reduction that preserved a stack overflow.

Expected Behavior:
Compile Errors.
Actual Behavior:
Stack Overflow
Steps:

public protocol P {
    associatedtype A = Self
    var foo: A { get }
}

extension P where A == Self {
    public var foo: Self { return self }
}

extension P where A: P {
    public var bar: A {
        return foo
    }
}

public struct S<Base> {

    internal var _base: Base

    internal init(_base: Base) {
        self._base = _base
    }
}

  extension S: P {
      public typealias A = Base

      public var foo: A { return _base }
  }

// ----

public protocol Q: P {    }

extension Q where A: Q {
    public var bar: A {
        return foo
    }
}

Thanks, logged as bugs://82796

bugs://82796 got closed with status fixed.