Another hack I came up with involves using this approach to work with SELECT INTO #Temp (if you want to avoid the maintenance overhead of maintaining the CREATE TABLE statement separately).
DECLARE @NullIfFmtOnly int = (SELECT 1);
IF @NullIfFmtOnly IS NULL SET FMTONLY OFF;
DECLARE @TopPct int = ISNULL(@NullIfFmtOnly, 0) * 100;
SELECT TOP (@TopPct) PERCENT
IF @NullIfFmtOnly IS NULL SET FMTONLY ON;
I found that if I didn't use RECOMPILE, the query plan for the FMTONLY scenario still pulled all the records even if it didn't insert them into the temp table. When I used RECOMPILE (at least in 2008 R2), it intelligently used Constant Scan instead of accessing the underlying tables. One does pay the price of recompiling the query on every execution, but I'm guessing if you're going to all this trouble with Temp tables in SSIS that query compilation is not a significant cost.