Cleaner way of un-hacking upstream project's mess. Added patch that might also be useful in putting together the real spec for this.