Merge pull request #4009 from leoetlino/common-id-assign ControllerInterface: Make the ID assigning code common