bugfix: detecting begin/end of scope

Scopes of mixed abstract and non-abstract methods in abstract classes were broken.