Fixes #4919: Fix the application abort routine so we actually abort

Custom patch from ticket
VERSION: 1.8.3rc2 was released yesterday; on to rc3