How many coordinates should be used for the potential energy surface of a non-rotating linear molecule? (3N-6) or (3N-5)?
The Cartesian Hessian ($\mathbf{H}_C$) can be obtained by from the Hessian computed in internal coordinates ($\mathbf{H}_i$) through a non-linear transformation
$$\mathbf{H}_C = \mathbf{B}^T\mathbf{H}_i\mathbf{B}$$
where $B_{ij}=\frac{\partial R_i}{x_j}$ and $R_i$ and $x_i$ is an internal and Cartesian coordinate, respectively.

In the case of the degenerate bending mode you can obtain the components of $\mathbf{H}_C$ that you need from $\frac{\partial^2 E}{\partial \theta^2}$, where $\theta$ is the bond angle, through suitable choices of $B_{ij}$'s.  

So the Hessian generated in the three internal coordinates has all the information you need.