Fixed #1172 (for real)

Fix #1172 by making 'friendModule' into 'friendModules' - a sequence used as a stack.