Some more investigation... it seems the translation of the variable goes wrong?
*************************************************************************************
** Engine 14.0.3164.1
** Auto statistics on
** Update with fullscan performed
** Compat level 140
-----------------------------------
-- CASE 1 : ORIGINAL QUERY /...