SECOND AMENDED AND RESTATED MASTER ADVISORY FEE WAIVER AGREEMENT