Probably has to do with your permissions via a role vs. permissions granted directly to you. Grant yourself permission on the DBA_OBJECTS table and then run your query again in both modes.