@DanThomas, I suspect this is due to the fact that in KM9 the KM Editor window name/title has changed. For example, it now looks like this:
Keyboard Maestro Editor — Go To Macro by Name (Spotlight) (Author.@DanThomas)
Chris @ccstone has devised a solution for this:
tell application "System Events"
tell application process "Keyboard Maestro"
set frontmost to true
tell (first window whose subrole is "AXStandardWindow")
### YOUR CODE HERE ###
end tell
end tell
end tell