Fixes some attached 'File' display anomalies, Gallery now obeys 'show only primary image in listing' setting (provided the view tells it is a listing type view) [#948]