This ticket is an off-shoot of T406628 (and might be related to the issue in T407516)
When there are only 2 or 3 cards the grid spacing is incorrect.