[pg]: reference definition checking added to tests