Issue #2784783 by RytoEX, quietone, jofitz, Charlotte17, Anybody, tomhollevoet, catch, Grevil: Migration of nodes with cck nodereferrer fields fails (SQL error) (cherry picked from commit 81174ad7)