context refactoring: r6049 got lost, re-apply
Authored by: cboos 2007-10-16
Parent: [r6055]
Child: [r6057]