What causes this error?

Code:
 Database error in vBulletin 5.1.0:  
Invalid SQL: SELECT DISTINCT node.nodeid, node.contenttypeid FROM vb5_node AS starter INNER JOIN vb5_node AS node
...