Added tests for self referencing rule