rtld: fixes for handling of the grouped options
(cherry picked from commit 7cdfe51f30965a365e3e7c829396a56e2a7e5141)