I tested your app. I think it may be the known issue after all. It happens when you wrap the call in a Count() statement. This is what I have tested so far:
RTL
SD.LLBLGen.Pro.ORMSupportClasses.NET20: 3.0.10.1001
SD.LLBLGen.Pro.LinqSupportClasses.NET35: 3.0.10.0927
Reproduce code
var q = from c in metaData.Customer
where c.CustomerServices.Any(cs => cs.Service is JointBillServiceEntity)
select new { c.CustomerNumber };
// everything ok
int result1 = q.ToList().Count;
// exception
int result2 = q.Count();
Generated SQL for result1
SELECT
[LPLA_1].[CustomerNumber]
FROM
[DB].[dbo].[Customer] [LPLA_1]
WHERE
( ( ( ( EXISTS (SELECT [LPA_L4].[ServiceId]
FROM (( [DB].[dbo].[Service] [LPA_L2]
INNER JOIN [DB].[dbo].[Customer_Service] [LPA_L4]
ON [LPA_L2].[ServiceId]=[LPA_L4].[ServiceId])
LEFT JOIN [DB].[dbo].[JointBillService] [LPA_L3]
ON [LPA_L2].[ServiceId]=[LPA_L3].[JointBillServiceId])
WHERE ( [LPLA_1].[CustomerId] = [LPA_L4].[CustomerId]
AND ( ( [LPA_L3].[JointBillServiceId] IS NOT NULL)))
)
))))
Generated SQL for result2
SELECT
TOP(@p2) COUNT(*) AS [LPAV_]
FROM
( SELECT
[LPLA_1].[CustomerNumber]
FROM [DB].[dbo].[Customer] [LPLA_1]
WHERE ( ( EXISTS (
SELECT [LPA_L3].[ServiceId]
FROM ( [DB].[dbo].[Service] [LPA_L2]
INNER JOIN [DB].[dbo].[Customer_Service] [LPA_L3]
ON [LPA_L2].[ServiceId]=[LPA_L3].[ServiceId])
WHERE ( [LPLA_1].[CustomerId] = [LPA_L3].[CustomerId]
AND ( ( [LPLA_3].[JointBillServiceId] IS NOT NULL))))))) [LPA_L1]
Parameter: @p2 : Int64. Length: 0. Precision: 0. Scale: 0. Direction: Input. Value: 1.
Exception for result2
{"An exception was caught during the execution of a retrieval query: The multi-part identifier \"LPLA_3.JointBillServiceId\" could not be bound.. Check InnerException, QueryExecuted and Parameters of this exception to examine the cause of this exception."}
at SD.LLBLGen.Pro.ORMSupportClasses.RetrievalQuery.Execute(CommandBehavior behavior) in c:\Myprojects\VS.NET Projects\LLBLGen Pro v3.0\Frameworks\LLBLGen Pro\RuntimeLibraries\ORMSupportClasses\Query\RetrievalQuery.cs:line 132
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchDataReader(IRetrievalQuery queryToExecute, CommandBehavior readerBehavior) in c:\Myprojects\VS.NET Projects\LLBLGen Pro v3.0\Frameworks\LLBLGen Pro\RuntimeLibraries\ORMSupportClasses\AdapterSpecific\DataAccessAdapterBase.cs:line 1576
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchProjection(List1 valueProjectors, IGeneralDataProjector projector, IRetrievalQuery queryToExecute, Dictionary
2 typeConvertersToRun) in c:\Myprojects\VS.NET Projects\LLBLGen Pro v3.0\Frameworks\LLBLGen Pro\RuntimeLibraries\ORMSupportClasses\AdapterSpecific\DataAccessAdapterBase.cs:line 1713
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchProjection(List`1 valueProjectors, IGeneralDataProjector projector, IEntityFields2 fields, IRelationPredicateBucket filter, Int32 maxNumberOfItemsToReturn, ISortExpression sortClauses, IGroupByCollection groupByClause, Boolean allowDuplicates, Int32 pageNumber, Int32 pageSize) in c:\Myprojects\VS.NET Projects\LLBLGen Pro v3.0\Frameworks\LLBLGen Pro\RuntimeLibraries\ORMSupportClasses\AdapterSpecific\DataAccessAdapterBase.cs:line 1675
at SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProProvider2.ExecuteValueListProjection(QueryExpression toExecute) in c:\Myprojects\VS.NET Projects\LLBLGen Pro v3.0\Frameworks\LLBLGen Pro\RuntimeLibraries\LinqSupportClasses\LLBLGenProProvider2.cs:line 178
at SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProProviderBase.ExecuteExpression(Expression handledExpression) in c:\Myprojects\VS.NET Projects\LLBLGen Pro v3.0\Frameworks\LLBLGen Pro\RuntimeLibraries\LinqSupportClasses\LLBLGenProProviderBase.cs:line 264
at SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProProviderBase.Execute(Expression expression) in c:\Myprojects\VS.NET Projects\LLBLGen Pro v3.0\Frameworks\LLBLGen Pro\RuntimeLibraries\LinqSupportClasses\LLBLGenProProviderBase.cs:line 93
at SD.LLBLGen.Pro.LinqSupportClasses.LLBLGenProProviderBase.System.Linq.IQueryProvider.Execute[TResult](Expression expression) in c:\Myprojects\VS.NET Projects\LLBLGen Pro v3.0\Frameworks\LLBLGen Pro\RuntimeLibraries\LinqSupportClasses\LLBLGenProProviderBase.cs:line 656
at System.Linq.Queryable.Count[TSource](IQueryable`1 source)
at FilteringOnEntityType.Program.Main(String[] args) in C:\Users\David\Desktop\FilteringOnEntityType\FilteringOnEntityType\FilteringOnEntityType\Program.cs:line 24
We will look into it.