Where is the error in the following P != NP pseudo-proof ? Here is a necessarily wrong proof of $P \neq NP$ as it relativizes, but I can't find the error :

Le $U$ be a universal Turing machine, whose inputs are restricted to Turing machines accepting languages in P.
Let $L = \mathcal{L}(U)$ the language accepted by $U$, hence the acceptation language restricted to P.


L is in NP as for each instance  where $\mathcal{L}(M) \in P$ and $x$ an input of $M$, the certificate of $x$ is a certificate for L too
L is not in P as it would be in $DTIME(n^k)$ for a fixed $k$ and as $DTIME(n^{m+1}) - DTIME(n^m) \neq \emptyset$, if we choose a M in $DTIME(n^{k+1})$ and fix it, U would decide the problem in $\mathcal{O}(n^k)$
You are being a little sloppy with your definitions: what exactly is the input to U, and what exactly are the conditions to accept? In particular, you probably need to include in the input  to U not just a Turing machine but also a specific polynomial that bounds the running time of the machine, because otherwise it's undecidable whether any particular TM really is polynomial time. But that's not the real problem.

The actual problem is that L(U) is not in NP. To be in NP, there needs to be a single polynomial p(n) that bounds the time to check a solution. But in your case this time is bounded by a polynomial q(n) that depends on the particular TM given as input. It's easy to choose inputs that cause q(n) to be larger than any fixed choice of p(n).