Fix for Mantis #25132

defcmp.pas, objectdef_is_related:
  * use "equal_defs" instead of "=", as the former also handles equivalence of specializations

+ added test


git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@25848 3ad0048d-3df7-0310-abae-a5850022a9f2