Moved some polymorphism-related complexity out of (witheachknol ...) and into (defined ...).