Refactor #3985: Fix bug when margin not set in ccs.Margin