I am trying to compile a procedure in which I have a cursor that selects from a table in a different schema but it is not compiling.

I am logged in as aaa.

Here is the procedure:

CREATE OR REPLACE PROCEDURE test
AS
CURSOR cur_test IS
SELECT * FROM test_table /*test_table is in schema bbb*/;
BEGIN
NULL;
END;

I get the following error message:
PLS-00201: identifier 'BBB.TEST_TABLE must be declared.

I have a public synonym for test_table and I have tried qualifying the table with the owner and I get the same error message. It obviously knows which table I am trying to query but it won't let me compile the procedure.

Any ideas?