Thanks, Dave, for the detective work! I confirm that your example produces the warning on v5.22.2 as well. (I'm not quite sure from your description whether the failure method on bleadperl is the same as that on v5.22.2. An assert is a fatal error (in C, anyway), whereas the message I'm seeing does not halt execution; if I add another statement after the end of your code sample, it does get executed.)
I'm happy to submit a bug report, but since you know much more about what's going on under the hood, you're probably a better contact person. If you don't have the time or inclination, however, I'll do it.