[cleanup] add on constraint to the extension join to create correct
query