Add handling of guards to the core module