Fixed signed/unsigned compare in by_name tests