Fix error when getting bounds that include an empty path