Issue 5592 WIP.
Final masonry fix.