CFRCPRAP-175: make sure to manage margins when there is border