Fix auto-calc of prefix type on from-prefix add

Changes the logic behind auto-calculating the type of a new prefix when
using from-prefix. We previously used a 'contains' operator, but that
only works for manually specified prefixes. 'equals' is used for the
from-prefix case.

Fixes #462.
Merge branch '462-fix-cli-from-prefix'