Support to run and test optimized code

A fix for #465 will follow later. DCE will still issue warnings in tests for Enumeration.