You have a stored procedure which have these characteristics:
1) The procedure has a parameter of the type nvarchar(MAX), call it @p
2) There is a SELECT from a table in the procedure.
3) In the SELECT there is an expression like @p + ','
Under these cicrumstances the procedure will not be put into the procedure
This may seem like a small thing, but if you use a procedure that uses
a function like inline_split_me to crack a comma-separated list into a table,
you are exposed to this behaviour, which could be costly in a multi-user
environment, because of constant recompile.
See http://www.sommarskog.se/arrays-in-sql-2005.html#tblnum for the