Adding a column to a table, and then updating in the next statement, typically does not work, because the UPDATE statement is compiled before the column is added. But it may work sometimes here, because it's a temp table. (If this sounds confusing to you, it is because it is confusing.)
Change the code to read:
Select *, IsOn = convert(bit, 1) into #Temp from table1