Improvements to subtype constraint checking. Fix issue #14