Plsql:1739 Differences in Validation?

I have the following case in my PL/SQL code

create or replace package body TestPackage as
   procedure TestProc(P_TestIn in pls_integer) is

      cursor c_cursor is
         select * from dual where TEST like '_20%';
   begin
       select count(*) from dual where TEST like '_20%';
   end TestProc;       
end TestPackage;

According to rule RSPEC
I’m wondering why I’m getting an issue on line 5, but NOT on line 7.
Any ideas or an explaination?

Using Sonarqube Version 9.9.1 (build 69595)

Thanks