Quote:

Is it possible that you have introduced a subtle variable scope issue by using INCLUDE?




Ignore that comment - INCLUDED files are imported as a type of UDF, so scope shouldn't be an issue.