Fixed checks for read or internal permission in built-in procedures.