This could to be due to parameter sniffing.
The execution plan might not be identical for both so even though your are running what looks like identical code, sql server will be taking a different execution route for each piece of SQL.
It might be worth taking a look at there respective execution plan to see if you can spot any differences. As per the question using OPTION(RECOMPILE).