Fix gallery race condition and remove console logging

The gallery would fail if a slide started animating away before
it's image finished downloading, see comment in the code.