For example,
<gallery> Test.jpg|thumb|123 </gallery>
yields,
... <figure-inline typeof="mw:Image/Thumb"> ...
where "thumb" should be ignored.
Maybe move up the "none" we place at the end so that subsequent formats become bogus, This would change in T305628 but, regardless, "none" is not a format
https://github.com/wikimedia/parsoid/blob/master/lib/ext/Gallery/index.js#L145
Or, strip it before transferring,
https://github.com/wikimedia/parsoid/blob/master/lib/ext/Gallery/modes.js#L120