Fix clampDimensionsToMaxima using wrong aspect ratio
Better handling of aspect ratio constraints