Add self reference tests