This is a shot in the dark, but it seems to me you would want to abandon the dates table altogether and adopt the following formula:
//Excluded Holidays this year (list incomplete for demo)
Local datevar array holidays := [date(2005,12,31), date(2005,11,24), date(2005,07,04),date(2005,02,14)]...