Update refactoring support to provide error messages when attempting to perform refactoring with an invalid selection for #46