Add test for foreign key self reference