Fix docking issues.

Hi Bas,

Fix of docking issues as reported on https://moodle.org/mod/forum/discuss.php?d=263080#p1139975 and RTL left padding with dock.  The latter of which is also a core issue.

Cheers,

Gareth