Before this change the method only has worked for the current key, otherwise the exception has been thrown, too. Imo it is not necessary to be able to get the current element this way.