Let $A \in L(X,Y)$ be a linear operator between Hilbert spaces and the operator $$\hat{A}: \ker(A)^{\perp} \rightarrow \operatorname{ran}(A)$$ is a restriction of $A$ which is bijective. Now $\ker(A)^{\perp}$ is certainly a closed space and since this operator is bijective and continuous, I would also suspect that this means that $\operatorname{ran}(A)$ is closed, because $\hat{A}$ is an isomorphism. But of course not every range of an operator is closed, so there has to be a mistake in this argument.
Edit: Ah got it. The inverse operator does not need to be bounded, as the open mapping theorem only works if $\operatorname{ran}(A)$ is closed, too.