Merge PR#3058:  Adding extra safety to selector casting macros