It was an interesting day today. Suddenly one of our APEX environments showed some errors. We have a 19.12 database on Exadata and APEX 21.1.4.
After first check, there were 2 invalid packages within APEX schema: WWV_FLOW_INTERACTIVE_GRID & WWV_FLOW_WIZARD_API.
Both of them became suddenly invalid, without any change within APEX itself, and they couldn’t be recompiled. These error messages are shown after trying to recompile it:
Package Body, Line 10363: PL/SQL: ORA-00600: internal error code, arguments: [qctbyt : bfc], , , , , , , , , , , 
Package Body, Line 10372: PLS-00364: loop index variable ‘L_COLUMN’ use is invalid
Ooookay. Google didn’t help me, but I found a possible bug on the Oracle Support, which led me to the main cause. The Bug 30483366 – ORA-600 [qctbyt : bfc] during parse of select statement with TABLE() function (Doc ID 30483366.8) was pointing to the eventually issue with TABLE() function. I unwrapped both of packages and indeed I found the usage of the TABLE() function on those complaining lines (FUNCTION GET_STATIC_IDS). I created a copies of those packages and compiled them without that block with TABLE() function and compilation was successfull. That confirmed, my assumption was correct.
Unfortunately, this bug is solved in the version 21.1 and there is no interim patch for the 19c. Therefore, we have to request an interim patch.