Really fix setting priority for tasks

When selecting the task to replace the task with based on priority, be
sure to limit the options to tasks with the same story id.