Move DSL guard into before hook