Eliminate with_val by generalizing value
Merge pull request #1662 from Melvar/pureM-constructor

Eliminate with_val by generalizing value
Faster universe checking

This mainly fixes a scoping issue which made the cycle checker search
too many times.

Fixes #1649