I am also getting this problem after changing the hard timeout value from empty to some number. I am using 2.2.3. A temporary fix is to remove the hard timeout value.
One solution that make you issue work:
Back-port the actual code too your pfSense installation.
From what I recall, the removal of firewall rules was buggy back then (2.1.5) so they repaired it - which introduces new versions.
You you don't want do 'deal' with it (because you can't), but you have the need to have your pfSense modified without being upgraded: switch to this sub-forum https://forum.pfsense.org/index.php?board=34.0 (be SURE that you read the rules FIRST).
Be ready to find out that the 'repair' will break squid …...
I believe this happens on upgrade if the CP .db files in /var/db didn't get reset. On 2.1.x they were in SQLite 2.x format and on pfSense 2.2+ it's SQLite 3.