Locking up is a bit of a worry, but if it was locked-up in a way the "mdadm -S" still worked it cannot have been locked too hard. I wonder what the cause was..
While I try to keep new version of mdadm mostly backwards-compatible with old versions that isn't always possible. It is possible - though maybe not likely - that Ubuntu init.d scripts depend on some behaviour of mdadm that has changed between the release that they ship and the current release. So it is always good to be cautious.
It should be fairly safe to simply install the mdadm that you have build and see what breaks. If nothing: you are happy. If something does break, you should still be able to "apt-get install --reinstall mdadm" (or whatever the command it) to get the ubuntu mdadm back in place.