The following DRC script will give wrong errors if "separation" is measured from inside a polygon to another edge also inside.
deep
report("separation-from-inside-bug")
l1 = input(1, 0)
l2 = input(2, 0)
l1.separation(l2, 2.um).output("sep(l1, l2) < 2um")
Layout:

issue-663.oas.gz
Result:

Without "deep" the result is correct:
