It seems there's a bug with the way you implemented the happiness fix.
From looking at the files it appears you basically added Ghandi's leader trait effect to everyone's existing traits, which creates a problem when playing as Napoleon. Napoleon's trait becomes obsolete with Steam Power, that means the happiness fix will also go obsolete along with it.
I simply changed his trait to never expire to get around it but hopefully you'll be able to find a real fix.
From looking at the files it appears you basically added Ghandi's leader trait effect to everyone's existing traits, which creates a problem when playing as Napoleon. Napoleon's trait becomes obsolete with Steam Power, that means the happiness fix will also go obsolete along with it.
I simply changed his trait to never expire to get around it but hopefully you'll be able to find a real fix.