Nonlinear aspects of supersonic flow past a cavity