diff --git a/refpolicy/Changelog b/refpolicy/Changelog
index ba84180..2f1134d 100644
--- a/refpolicy/Changelog
+++ b/refpolicy/Changelog
@@ -1,3 +1,4 @@
+- Patch to stabilize modules.conf `make conf` output, from Erich Schubert.
 - Move xconsole_device_t from devices to xserver since it is
   not actually a device, it is a named pipe.
 - Handle nonexistant .fc and .if files in devel Makefile by
diff --git a/refpolicy/support/segenxml.py b/refpolicy/support/segenxml.py
index ad4dcfd..f25cd61 100755
--- a/refpolicy/support/segenxml.py
+++ b/refpolicy/support/segenxml.py
@@ -214,7 +214,9 @@ def getLayerXML (layerName, directories):
 	
 	# For each module file in the layer, add its XML.
 	for directory in directories:
-		for module in glob.glob("%s/*.if" % directory):
+		modules = glob.glob("%s/*.if" % directory)
+		modules.sort()
+		for module in modules:
 			layer_buf += getModuleXML(module)
 
 	layer_buf.append("</layer>\n")