Okay, looks like I discovered what precisely went wrong. Apparently when using premises (as opposed to axioms) in the proof, we are not allowed to generalize on free variables in those premises. So, steps (2) and (10) are illegal. That was unexpected! I suppose I should read the textbook more carefully next time...

Thanks anyway guys!