Attempting to clean up the getPrototypeOf sham logic

I think this reads much more cleanly than a bunch of boolean logic and ternaries, but I'd love it if @webreflection and/or @benvie could confirm that the logic is still correct first.