Fixed some more issues with interior perimeter identification.