Do not apply unnecessary file dimensions constraints

I'm not sure what's the exact goal of code that I had to modify, but 
after my modification it definitely solves the problem and doesn't break 
the test.

Problem was occurring when for instance parsing this wikitext: 
[[Image:ASCII Code Chart-Quick ref card.jpg|thumb|361px]] height 
constraint of 180px was applied - and because image have to stay 
proportional it's width was limited as well.

Change-Id: I2d56c9f1ed164ffcdefd0de94d95f03f744fea41
Merge "Do not apply unnecessary file dimensions constraints"