To verify you've got the identical files on dev and staging, you can do some variation on
find . -name *.pl | xargs md5sum | sort
and compare the output of that command from the two platforms. Assuming there's no configuration information in those files that differ between the environments, that should confirm or deny you have identical installations.
Restarting the web server meant something ten years ago, these days, not so much.
Apart from that, try to nail down why the bug that's been solved is reappearing -- what fix was made to solve that (it's documented in your git commit comments, right?). Maybe go back to basics and add a few logging lines to confirm that things are working as they should.
Good luck -- debugging is indeed a black art. :)
Alex