Fix #1382999 / #277 - errors when a module stops implementing an interface