The code was checking flags with applying any get magic, so when a
match was doing putting a numeric string into $1, none of the flags
checked were set, so producing the "non-numeric process ID" error.
(cherry picked from commit 8af710ebc7fee929ae47793d5a0cce5362af52db)