Use this code...
!scriptcard{{
--&ResName|Spellcasting
+++dnd5elib+++
--#sourceToken|@{selected|token_id}
-->Lib5E_FindResource|[*S:character_id];[&ResName];ResNameAddress;ResValueAddress
--+TEST MESSAGE|[*S:[&ResNameAddress]]
--+TEST MESSAGE|[*S:[&ResValueAddress]]
}}
... and a character with this test data...
... and then you should see on the output card that the resource named "aaa" is being found, rather than the resource named "Spellcasting". The resource-slot that I have marked with a blue marker, that is the only resource-slot that this bug occurs with.
Additional info, just in case it matters: my test-character was made by directly editing the character sheet, and he has the "Use custom class" checkbox enabled.