Internal Server Error trying to establish a fork relationship

I have two projects on gitlab.com, on two different namespaces. The projects were created independently, but they are essentially the same code, so I’d like to create a fork relationship. They’re both public projects and have the fork permission enabled. When I try to create the fork relationship with the API I get “500 Internal Server Error”:

$ curl --request POST --header "PRIVATE-TOKEN: XXXXXXXXXXX" "https://gitlab.com/api/v4/projects/43092185/fork/43174140"
{"message":"500 Internal Server Error"}

Replacing the “upstream” id with another completely different project (in the same namespace) worked fine. What could the problem (or a workaround) be?

(PS. Establishing the relationship in the inverse direction works too. Could it be that GitLab doesn’t like it when a fork has a lower id than the parent?)