Fix #1091. Add spacing to pos later when tb or rl.
Add test for issue #1091.
Merge pull request #1092 from Ian-Foote/stacklayout_spacing

Fix #1091. Add spacing to pos later when tb or rl.