Fix procedure casting not preserving original value
Don't use object lookup
Merge branch 'MathWizz-procedure-cast-fix'