Discrete dislocation simulation of nanoindentation: the influence of obstacles and a limited number of dislocation sources