Thanks for your help, Marco.
My issue turned out to be related to the fact that I need to determine the schema owner based upon the database connected. Doing this meant that I had to set the schema owner using EXECUTE IMMEDIATE. I had defined the connection with the read-only properly enabled...