OK, here is my fix - this absolutely does not explain the original problem, but this is what I did:
Whenever I have a performance problem with a parameter, to solve this problem I declare "local" variables for all parameters, assign these parameters to these variables, and then use only local variables in the rest of proc, for example:
ALTER Procedure [dbo].[rptDateIncomeStatementPlusCash] @PropertyID int = Null, @PortfolioID int = Null, @StartDate datetime = Null, @EndDate datetime = Null, @AcctMethod tinyint = 1 AS DECLARE @xPropertyID int DECLARE @xPortfolioID int DECLARE @xStartDate datetime DECLARE @xEndDate datetime DECLARE @xAcctMethod tinyint SET @xPropertyID= @PropertyId SET @xPortfolioId = @PortfolioId SET @xStartDate = @StartDate SET @xEndDate = @EndDate SET @xAcctMethod = @AcctMethod
the similarity is that when the sniffing parameter is a problem, you can run the stored procedure through MGMT studio and get better performance than running it as SQL, and the changes (as above) usually fix.
In my case, I saw the difference between direct TSQL and the execution of proc (although this is not related to performance), I gave it a try - and it worked; I'm sorry that I did not have a better explanation, because, frankly, I would be scared to think that the SQL server would happen with unexpected results when using almost identical code.
I found this MS newsletter about a similar but different problem, which at least confirms that, under the right circumstances, the SQL server may give you bad answers, and this related error report using this keyword phrase:
Description: Two sessions, each of which many calls to procedure P with changing parameter values. procedure P executes a single request against static data, sometimes with the (RECOMPILE) option, and sometimes without it.
Sometimes P gives incorrect results (for playback below, this is usually about 1/2% - 1% of the time). When the results of P are incorrect, P returns either 0 or two times the expected number of rows.
Someone yesterday left a comment about sniffing options as an opportunity, but for some reason they deleted their comments (or response), so I can not give them credit for a hint.