Exclude Inf values from automatic scaling
Fix scoping issues in Imagine format