Fix issue with ordering of checks.  Bounds should only be checked in val...

Seems like this commit from 1.4.0 release was not merged into "dev" branch