#642 Fixed lost of state when returning from template editor to module editor