Fix issue 313: Canvas does not reflect the change of a layer order