Merge pull request #8978 from davidflanagan/bug856188-v1-train

Merge pull request #8955 from davidflanagan/bug856188(cherry picked from commit a845be046c5d3cb077e3c78f963ca5c079e7ab3d)

Conflicts:

	apps/gallery/js/gallery.js
Merge pull request #9070 from davidflanagan/bug856188-v1.0.1

Merge pull request #8978 from davidflanagan/bug856188-v1-train