Trim cells less aggressively

Only remove the padding cells (if empty), not any other empty cells
already in the array. This will better support e.g. rule 1.