Solar flare hard X-rays (HXRs) are produced as bremsstrahlung when an accelerated population of electrons interacts with the dense chromospheric plasma. HXR observations presented by Kontar et al. (2010) using the Ramaty High-Energy Solar Spectroscopic Imager (RHESSI) have shown that HXR source sizes are 3-6 times more extended in height than those predicted by the standard collisional thick target model (CTTM). Several possible explanations have been put forward including the multi-threaded nature of flare loops, pitch-angle scattering, and magnetic mirroring. However, the nonuniform ionisation (NUI) structure along the path of the electron beam has not been fully explored as a solution to this problem. Ionised plasma is known to be less effective at producing nonthermal bremsstrahlung HXRs when compared to neutral plasma. If the peak HXR emission was produced in a locally ionised region within the chromosphere, the intensity of emission will be preferentially reduced around this peak, resulting in a more extended source. Due to this effect, along with the associated density enhancement in the upper chromosphere, injection of a beam of electrons into a partially ionised plasma should result in a HXR source which is substantially more vertically extended relative to that for a neutral target. Here we present the results of a modification to the CTTM which takes into account both a localised form of chromospheric NUI and an increased target density. We find 50 keV HXR source widths, with and without the inclusion of a locally ionised region, of ~3 Mm and ~0.7 Mm, respectively. This helps to provide a theoretical solution to the currently open question of overly-extended HXR