For sole proprietorships and partnerships, the owners are allowed to make deferrals against any draw they take from the business. All of the income from self-employment and deferrals are considered to be determined as of year.
S-corp shareholders typically get W-2 income and S-corp dividends. The S-corp dividends are not considered compensation for purposes of the plan. Conceivably, the IRS could say that if payments made during the year that were not from amounts subject to taxation when paid, then salary deferrals cannot be taken from those payments.
I haven't seen this situation, so this is just my thoughts.