fixes for image index on dynamic albums

http://www.zenphoto.org/support/topic.php?id=773668#post-1072803
Merge remote-tracking branch 'origin/master' into 1.4.6