Only try to use CakeErrorController if AppController exists.

This fixes missing error pages when there are parse errors in
AppController.

Fixes #3850