• create NONCLUSTERED INDEX #idx_ID on #TID(ID) include (TID)

    hmmm. the create index is for a temp table I don't see referenced anywhere else (I see #ID and #EID)

    Can you remove the create index statement from the sproc and try rerunning the bids package.