Steven Feuerstein on Oracle PL/SQL: Zero tolerance for out-of-scope references!
But if you do take the time to carefully refactor your code when you created nested subprograms (and you should do both: created nested subprograms and carefully refactor your code), the results will be appreciated by all
Source: stevenfeuersteinonplsql.blogspot.com