bugfix in theme inheritance check