To build a ligature with components that have dots, you need to assign the dot to snap with a specific anchor (i.e. top_1 or top_2). Sometimes, for whatever reason, when a dot is not assigned an anchor, the dot can manually be moved, and the glyph still displays automatic alignment.
layers = []
for glyph in Font.glyphs:
for master in Font.masters:
layer = glyph.layers[master.id]
if layer and layer.hasAlignedSideBearings():
for component in layer.components:
if component.isAligned() < 0:
if layer not in layers:
layers.append(layer)
break
print layers
Font.parent.windowController().addTabWithLayers_(layers)