Changing the code from line 42 to the following would make it possible to view the according masters of another font, even if it has more masters than the current:
if len(masters) != len(nextFontMasters):
if activeMasterIndex <= len(nextFontMasters):
nextLayer = nextGlyph.layers[activeMasterIndex]
else:
nextLayer = nextGlyph.layers[0]
else:
nextLayer = nextGlyph.layers[activeMasterIndex]
Changing the code from line 42 to the following would make it possible to view the according masters of another font, even if it has more masters than the current: