Why is it wrong to calculate the amount of oxygen directly from the products of a combustion reaction? I've been stumped by a question in my textbook concerning combustion analysis. 


  A $\pu{0.5438g}$ sample of a liquid consisting of only $\ce{C}$, $\ce{H}$, and $\ce{O}$ was burned in pure oxygen, and $\pu{1.039g}$ of $\ce{CO2}$ and $\ce{0.6369g}$ of $\ce{H2O}$ were obtained. What is the empirical formula of the compound?


Firstly, I calculated the amount of substance of carbon and hydrogen by dividing the masses of each product by their respective molar masses.
\begin{align}
(1.0390/44.01) = n(\ce{C}) &amp;= 0.02360\\
2\cdot(0.6369/18.02) = n(\ce{H}) &amp;= 0.0706\\
\end{align}

My textbook then states that I must find the sum of the masses of carbon and hydrogen, and then deduct this sum from the mass of the liquid compound to get the mass of oxygen:
\begin{align}
0.02360 \cdot 12.01 &amp;= 0.283535\\
0.0706 \cdot 1.01 &amp;= 0.28637\\
0.5438 - (0.283535 + 0.28637) &amp;= m(\ce{O}) \\
m(\ce{O}) &amp;= \pu{0.1888g}\\
\end{align}

I have no qualms with this approach, but why can't I find the amount of oxygen directly from the products?
\begin{align}
\text{I.e.}&amp;&amp; 2\cdot(1.0390/44.01) &amp;= n(\ce{O}) &amp;\text{in }\ce{CO2}\\
\text{and} &amp;&amp; (0.6369/18.02) &amp;= n(\ce{O}) &amp;\text{in }\ce{H_2O}.\\
\end{align}

$$\text{Amount of oxygen in liquid compound} = n(\ce{O})\text{ in }\ce{CO2} + n(\ce{O})\text{ in }\ce{H2O}.$$ 

I know this doesn't work, but my question is why? It seems perfectly intuitive to me, and yet it doesn't work.
Let's first write the chemical equation for the reaction (I will leave it unbalanced because the stoichiometry is irrelevant):
$$\ce{C_xH_yO_z + O2 -&gt; CO2 + H2O}$$
To do this question, we need to find the mole ratio of carbon, hydrogen and oxygen in $\ce{C_xH_yO_z}$, then we can find its empirical formula. 

From the above equation, it is clear that all the carbon in $\ce{CO2}$ originated from the compound and that all the hydrogen $\ce{H2O}$ originated from the compound. However, all the oxygen in $\ce{CO2}$ and $\ce{H2O}$ didn't just come from the compound, it came from the compound and gaseous oxygen. Therefore, from your method, you are just finding the total amount of oxygen in the reactants, not the number of moles of oxygen in the compound.