Fixed bug #2818 with another side of ForeignKey. Missed condition detail in a89b156 commit