PER-107: various fixes related to static methods and hook handlers