Ok, the problem is here: https://github.com/owncloud/core/blob/master/lib/private/preview.php#L389

It should be:
```
end($possibeThumnails);
if (key($possibleThumbnails) < $maxX) {
	return current($possibleThumbnails);
}
```
instead of
```
if (key(end($possibleThumbnails)) < $maxX) {
	return current(end($possibleThumbnails));
}
```