Dismiss of dialog with cancel then show immediately causes button to stick around (not any more)

Small bug (thanks José Jorge Ferreira) where if you show a HUD with a cancel button, then dismiss it, then immediately show another one (usually an image), the cancel button will stick around. The button was being removed after the animation finished