context-refactoring: make sure that a rendering context `.perm` is actually bound to that context `.resource`.
Authored by: cboos 2007-11-06
Parent: [r6131]
Child: [r6133]