[regression] Use proper type to reach npos member.