Moved type checking recursive call so that it's tail call optimizable and avoids uneccessary computation.
Moved type checking recursive call so that it's tail call optimizable and avoids uneccessary computation.

juodaspaulius/clafer-old-customBNFC,juodaspaulius/bclafer_old,juodaspaulius/clafer,gsdlab/clafer,gsdlab/clafer,juodaspaulius/clafer