i suggest to split iptables rules-save in four separate rulesets: one for every chain. /var/lib/iptables/sules-save -> /var/lib/iptables/{filter,mangle,nat,raw} this can simplify the maintenance on wide firewalls
hardcoding the chains is ugly post a patch to dynamically save/restore all the chains and we can talk