Fixed ResourceRepository::add() to be deterministic when selectors are passed. Closes #17