Bugfix on inherit private magic methods

Cache the call to `getName` in a variable