Here is the dirty fix, I'm heading off to sleep.
If the function CurrentAdId doesn't return a number, then
this will ensure it returns 0 (prevents your error, may not display
an ad):
<CFFUNCTION
NAME="CurrentAdId"
ACCESS="Private"
RETURNTYPE="numeric"
HINT="For internal use. Returns the Id of the current ad in
rotation.">
<!--- Return the adId from the current row of the
GetAdIds query --->
<cfset var returnVal = ListGetAt(THIS.AdList,
THIS.CurrentListPos)>
<cfif NOT IsNumeric(returnVal)>
<cfset returnVal = 0>
</cfif>
<CFRETURN returnVal>
</CFFUNCTION>