I have a document with two tikz pictures, both use the fit library. As long as I only have one picture everything works fine:
\documentclass[a4paper]{article}
\usepackage[english]{babel}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\usetikzlibrary{fit}
\node(n){x};
\node [fit=(n),draw]{};
\end{tikzpicture}
\end{document}
As soon as I add a second picture:
\documentclass[a4paper]{article}
\usepackage[english]{babel}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\usetikzlibrary{fit}
\node(n){x};
\node [fit=(n),draw]{};
\end{tikzpicture}
\begin{tikzpicture}
\usetikzlibrary{fit}
\node(n){x};
\node [fit=(n),draw]{};
\end{tikzpicture}
\end{document}
I get the following error
Package pgfkeys Error: I do not know the key '/tikz/fit' and I am going to ignore it. Perhaps you misspelled it.
Why is the pgfkey suddenly missing in the second picture and what can I do to fix it?
