pass consistent parameters to canonical_action?

now we only have to look up @scope[:scope_level] once per call to
canonical_action? and we don't have a variable named "flag"
only test `prefix` once

we don't need to repeat if statements