Fix subtle stupid bugs related to factory coverage.