Undo change to Entity
Moving template specialisation caused unresolved external on Windows (and probably on Mac too- the function isn't used there yet).