Fix test to insert join object in correct context