I can tell you the concept (which is pretty simple), but you would need some ASM knowledge and understanding of the shadow data loading/storing subroutines to be able to write a fix yourself. What's probably easier for everyone is if I release a patch to change the behavior, which I plan on doing once I incorporate a working version in my hack.
Here's the concept for those of you that are interested: There are five shadow data slots of 64 bytes each. These store the same stat data as the RAM locations that store your current party stats. If you want to see what these are, click the spoiler button below. (I took these from the Tower of Bab-il documents; I didn't come up with them on my own.)
[spoiler]1000 *character id/handedness
1001 *class id/row properties
1002 level
1003-6 current status anomalies
1007-8 current hp
1009-A maximum hp
100B-C current mp
100D-E maximum mp
100F *base strength
1010 *base agility
1011 *base vitality
1012 *base wisdom
1013 *base willpower
1014 *modified strength
1015 modified agility
1016 *modified vitality
1017 modified wisdom
1018 modified willpower
1019 attack elemental
101A *attack strong vs. creature types***
101B physical attack multiplier
101C physical attack percent
101D physical attack base
101E attack status 1***
101F attack status 2***
1020 elements weak vs***
1021 elements very weak vs***
1022 magical defense multiplier
1023 magical defense percent
1024 magical defense base
1025 elemental defense (if immunity bit wasn't set)***
1026 elemental defense (if immunity bit was set)***
1027 *defense strong vs. creature types***
1028 physical defense multiplier
1029 physical defense percent
102A physical defense base
102B status immunity 1***
102C status immunity 2***
102D-F ?
1030 *helmet
1031 *armor
1032 *gauntlet
1033 *right-hand item
1034 *right-hand quantity
1035 *left-hand item
1036 *left-hand quantity
1037-9 *experience
103A ?
103B speed modifier. lower = faster. for autobattles, starts at 01; otherwise
starts at 10. slow adds +08, (upper bound 20) haste adds -3 (lower bound 0C)
103C ?
103D-F *experience to level up
[/spoiler]
Since there aren't any unused locations of RAM (that I know of), I knew I had to fit as many characters' stat data within this 64 x 5 = 320 bytes of data that I could. Ideally, this would be 14, because there are 14 character classes and sets of sprites (not including Golbez and Anna, who don't have complete sets). In order to do this, I needed to store only the absolutely essential stats of a character, removing non-essential stats like modified strength/agility/vitality, hit percentage, attack statuses, etc. I call these "non-essential" because they can be calculated from a character's base stats and equipment data.
Looking at the data, I pared the stat list down to: character id (1 byte), class id (1), level (1), max HP (2), max MP (2), base str/agil/vit/wis/will (5), helmet (1), armor (1), gauntlet (1), right-hand weapon (2), left-hand weapon (2), and experience (3). This adds up to 22 essential bytes per character. Finally, I divided the 320-byte block by 22, and lo and behold there's room for 320/22 = 14.54 characters. It's like it was fated to be.
A bonus side effect of this method is that this should fix the adamant armor bug, since switching characters out would clear the elemental defense byte of the character.