Core: Don't trim value in min/max/rangelength methods

Fixes #1274