track frame visibility only in the scope

fixes #376