A guy from another forum pointed out that this could be caused by the wrong type being used. This was actually the case.

dglOpenGL.pas also defines a TVector4f structure. Because this unit was the last one in the uses-clause, it was overwriting the typedef from n3d_vectors.pas. That's what caused the issue.