Account for getBoundingClientRect returning read-only elements.