Regression from PR #739 (WA-RAILS7-013). MountPoint.unwrap_app over-traverses through engine classes (which respond to .app) and returns nil instead of the engine class. Fix: add return app if app.is_a?(Class) guard. See PR for full root cause analysis.