More work on error state handling in PAM