Regarding unique factorization in a polynomial ring and irreducibles I believe I'm not correctly understanding the concept of unique factorization and irreducibles.
Consider $R = \mathbb{F}_7$ and $h \in R[x]$ where $h = x^4 + 4x^3 + 3x^2 + 5x + 6$. Now $h$ has the following factorizations:
$h_1 = (3x^2 + 3x + 4)(5x^2 + x + 5)$
and
$h_2 = (x^2 + x + 6)(x^2 + 3x + 1)$
All four of those quadratics are irreducible in $R[x]$.
So factorization does not appear to be unique in $R[x]$. But I read on wikipedia (which may be wrong), that if $R$ is a UFD, then $R[x]$ is a UFD.
I must have a misunderstanding because $R = \mathbb{F}_7$ is a UFD, but we have shown two distinct factorizations of a polynomial in $R[x]$. Where am I going wrong?

Hint $\,\ {\rm mod}\ 7\!:\,\ 3\cdot 5\equiv 1\,\Rightarrow\, h_1 = fg \,\equiv\,(3f)(5g)\equiv h_2$
