I have seen situations where there were repeated ID arguments (http://projects.theforeman.org/issues/3756) so it would be worth checking the Foreman developers if this is a bug or not.