If it is possible to trace the execution of a predicate in a locked module with the debugger, privacy might not be respected. Therefore, the predicates in a locked module must be set to skipped if they have to be hidden (they are not skipped by default). It is not allowed to reset the skipped flag of procedures defined in a locked module.
Note also that the debugger provides an option ( m) to output the caller module of a goal in the trace line (in the form module:goal).