Adjust the last row's height for auto-width layout.

Good day!
This is rather a proposed enhancement, and you may ignore it if you think it is not actually needed.
I used the auto-width layout a lot and noticed the behaviour that I didn’t like:
if the last row is incomplete, the thumbs in that row often look much larger than the thumbs in the previous (justified) rows. That is especially noticeable when the container size is small. (Auto-height layout doesn’t seem to have this problem, though.)
I tried to fight this issue in different ways, and the best one I found so far is to restrict the height of an incomplete row by the max height of the rows before it. The max height is calculated separately for the rows having vertical thumbs and the rows having horizontal thumbs. This way the whole gallery looks more consistent IMO.
Here is the example of several galleries with both proposed and original methods (only incomplete gallery rows differ):
http://jsfiddle.net/mooncat/3TzqP/embedded/result/
I’m sorry if I wasted your time, I just thought maybe it would be useful to someone else. :)