maximal algebraically independent sets in ring extensions

Let $E/K$ be a field extension. It is a well known fact that all maximal subsets $A \subset E$ consisting of algebraically independent elements over $K$ have the same cardinality (which is by definition the transcendence degree of $E$ over $K$).

I suspect that this does not hold for arbitrary $K$-algebras $E$ (not even for finitely generated ones), but I don't know any counterexample. Can you name some preferably simple example where the statement doesn't hold?

• @user26857: Yes, that is clear since the quotient field of $E$ is an algebraic extension of $K(A)$ in each case. – Dune Sep 23 '14 at 13:58
Let $E=K[X,Y,Z]/(XY,XZ)$. Then $x$ (the residue class of $X$) is a maximal algebraically independent subset, and $y,z$ are also algebraically independent.