[ issue 1290 ] fixed by checking for definitions by copatterns
[ issue 1290 ] test case