Opus will work out the basename or the extension (depending on which command you run) and then select based on that using a wildcard.
If RMD.ahk.bak is selected then one command will select .bak and the other will select RMD.ahk.
If RMD.ahk is selected then one command will select .ahk and the other will select RMD. (which includes RMD.ahk.*)