in reply to Vanishing bug

This method is itself called from a grandparent method that in turn is invoked in a sort {} block that ranks the values of whole hands of cards. I can only replicate the error when using a sort block to call the grandparent method. Other invocations are fine.

Localize $a and $b at the beginning of your method.

Makeshifts last the longest.