MDL-41181 function moveto_module does not modify properties of object

instead it returns the new value for module visibility