Fix regression with removing non-dead code